boolean (@NotNull AnActionEvent e) { final VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE_ARRAY)[0]; Editor editor = VcsAnnotateUtil.getEditorFor(file, e.getDataContext()); return editor != null && AnnotateToggleAction.hasVcsAnnotations(editor); }