ContentRevision (@Nullable Entry e, final IdeaGateway gw) { if (e == null) return null; return new ByteBackedContentRevision() { @Override public @Nullable String getContent() { if (e.isDirectory()) return null; return e.getContent().getString(e, gw); } @Override public byte @Nullable [] getContentAsBytes() { if (e.isDirectory()) return null; return e.getContent().getBytes(); } @Override public @NotNull FilePath getFile() { return Paths.createDvcsFilePath(e.getPath(), e.isDirectory()); } @Override public @NotNull VcsRevisionNumber getRevisionNumber() { return VcsRevisionNumber.NULL; } }; }