VirtualFile (@NotNull AnActionEvent e) { final Boolean nonLocal = e.getData(VcsDataKeys.VCS_NON_LOCAL_HISTORY_SESSION); if (Boolean.TRUE.equals(nonLocal)) return null; VirtualFile file = e.getData(VcsDataKeys.VCS_VIRTUAL_FILE); if (file == null || file.isDirectory()) return null; FilePath filePath = e.getData(VcsDataKeys.FILE_PATH); if (filePath == null || filePath.getFileType().isBinary()) return null; return file; }