private static void perform(AnActionEvent e, boolean selected) {
    final Project project = e.getRequiredData(CommonDataKeys.PROJECT);
    final VirtualFile file = e.getRequiredData(CommonDataKeys.VIRTUAL_FILE_ARRAY)[0];
    Editor editor = Objects.requireNonNull(VcsAnnotateUtil.getEditorFor(file, e.getDataContext()));

    if (!selected) {
      AnnotateToggleAction.closeVcsAnnotations(editor);
    }
    else {
      doAnnotate(project, editor, file);
    }
  }
private static void perform(AnActionEvent e, boolean selected)