boolean (@NotNull DataContext context) { Project project = context.getData(CommonDataKeys.PROJECT); if (project == null) return false; List<FilePath> selectedFiles = VcsContextUtil.selectedFilePathsIterable(context) .take(MANY_CHANGES_THRESHOLD) .toList(); if (selectedFiles.isEmpty()) return false; List<FilePath> symlinkedPaths = getContextSymlinkedPaths(project, context); if (symlinkedPaths != null && canShowNewFileHistory(project, symlinkedPaths)) { return true; } if (canShowNewFileHistory(project, selectedFiles)) { return ContainerUtil.all(selectedFiles, path -> AbstractVcs.fileInVcsByFileStatus(project, path)); } if (selectedFiles.size() == 1) { FilePath selectedPath = ContainerUtil.getFirstItem(selectedFiles); if (selectedPath == null) return false; VirtualFile fileOrParent = getExistingFileOrParent(selectedPath); if (fileOrParent == null) return false; if (canShowOldFileHistory(project, selectedPath, fileOrParent)) { return AbstractVcs.fileInVcsByFileStatus(project, selectedPath); } } return false; }