@Override public void save(DataOutput out) throws IOException { out.writeInt(myTimestamps.size()); for (Map.Entry<String, Long> entry : myTimestamps.entrySet()) { out.writeUTF(entry.getKey()); out.writeLong(entry.getValue()); } }
@NotNull private static String getPresentableFile( @NotNull String url, @Nullable Map<VirtualFile, VirtualFile> presentableFilesMap) { final VirtualFile file = VirtualFileManager.getInstance().findFileByUrl(url); if (file == null) { return url; } if (presentableFilesMap == null) { return url; } for (Map.Entry<VirtualFile, VirtualFile> entry : presentableFilesMap.entrySet()) { if (file == entry.getValue()) { return entry.getKey().getUrl(); } } return url; }