boolean (@NotNull AnActionEvent e) { VirtualFile selectedFile = getSelectedFile(e); if (selectedFile == null) { return false; } VirtualFile currentFile = getEditingFile(e); if (currentFile == null) { return false; } if (!canCompare(selectedFile, currentFile)) { return false; } return true; }