protected Handler getHandler(@NotNull AnActionEvent e) {
    Project project = e.getProject();
    EditorWindow currentWindow = e.getData(EditorWindow.DATA_KEY);

    Content content = currentWindow == null ? getContentFromEvent(e) : null;
    if (content != null && content.isPinnable()) {
      return createHandler(content);
    }

    EditorWindow window;
    if (currentWindow == null) {
      window = project == null ? null : FileEditorManagerEx.getInstanceEx(project).getCurrentWindow();
    }
    else {
      window = currentWindow;
    }

    VirtualFile selectedFile = window == null ? null : getFileFromEvent(e, window);
    return selectedFile == null ? null : createHandler(window, selectedFile);
  }
protected Handler getHandler(@NotNull AnActionEvent e)