private static void performActionImpl(@NotNull Object element,
                                        @NotNull Component component,
                                        @Nullable AnActionEvent e,
                                        @JdkConstants.InputEventMask int modifiers) {
    GotoActionModel.ActionWrapper wrapper = element instanceof AnAction ? null : (GotoActionModel.ActionWrapper)element;
    AnAction action = element instanceof AnAction ? (AnAction)element : wrapper.getAction();
    Presentation presentation = wrapper != null ? wrapper.getPresentation() :
                                action.getTemplatePresentation().clone();
    InputEvent inputEvent = e != null ? e.getInputEvent() : null;
    DataManager dataManager = DataManager.getInstance();
    DataContext context = dataManager != null ? dataManager.getDataContext(component) : DataContext.EMPTY_CONTEXT;
    AnActionEvent event = new AnActionEvent(
      inputEvent, context, ActionPlaces.ACTION_SEARCH, presentation, ActionManager.getInstance(),
      inputEvent == null ? modifiers : inputEvent.getModifiers());
    event.setInjectedContext(action.isInInjectedContext());
    if (ActionUtil.lastUpdateAndCheckDumb(action, event, false)) {
      Window window = SwingUtilities.getWindowAncestor(component);
      ActionUtil.performDumbAwareWithCallbacks(action, event, () ->
        ActionUtil.doPerformActionOrShowPopup(action, event, popup -> {
          if (window != null) {
            popup.showInCenterOf(window);
          }
          else {
            popup.showInFocusCenter();
          }
        }));
    }
  }
private static void performActionImpl(@NotNull Object element,
                                        @NotNull Component component,
                                        @Nullable AnActionEvent e,
                                        @JdkConstants.InputEventMask int modifiers)