public static void showForActionButtonEvent(@NotNull JBPopup popup, @NotNull AnActionEvent e) {
    InputEvent inputEvent = e.getInputEvent();
    if (inputEvent == null) {
      popup.showInFocusCenter();
    }
    else {
      Component component = inputEvent.getComponent();
      if (component instanceof ActionButtonComponent) {
        popup.showUnderneathOf(component);
      }
      else {
        popup.showInCenterOf(component);
      }
    }
  }
public static void showForActionButtonEvent(@NotNull JBPopup popup, @NotNull AnActionEvent e)