@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException {
    RelativePoint relativePoint = JBPopupFactory.getInstance().guessBestPopupLocation(editor);
    AnActionEvent event = AnActionEvent.createFromInputEvent(
      relativePoint.toMouseEvent(), ActionPlaces.INTENTION_MENU,
      myPresentation.clone(), EditorUtil.getEditorDataContext(editor));

    AnAction action = getAction();
    if (!ActionUtil.lastUpdateAndCheckDumb(action, event, false)) return;
    ActionUtil.performDumbAwareWithCallbacks(action, event, () ->
      ActionUtil.doPerformActionOrShowPopup(action, event, popup -> {
        popup.showInBestPositionFor(editor);
      }));
  }
@Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file)