VirtualFile () { final RepositoryTreeNode node = getSelectedNode(); if (node == null) return null; DirectoryEntry entry = node.getSVNDirEntry(); if (entry == null || !entry.isFile()) { return null; } String name = entry.getName(); FileTypeManager manager = FileTypeManager.getInstance(); if (entry.getName().lastIndexOf('.') > 0 && !manager.getFileTypeByFileName(name).isBinary()) { Url url = node.getURL(); SvnFileRevision revision = new SvnFileRevision(myVCS, Revision.UNDEFINED, Revision.HEAD, url, entry.getAuthor(), entry.getDate(), null, null); return new VcsVirtualFile(node.getSVNDirEntry().getName(), revision, VcsFileSystem.getInstance()); } else { return null; } }