private boolean isPopupMenuAction(@NotNull AnActionEvent event) {
    if (!(myAction instanceof ActionGroup)) return false;
    if (!event.getPresentation().isPopupGroup()) return false;
    if (event.getPresentation().isPerformGroup()) return false;
    return true;
  }
private boolean isPopupMenuAction(@NotNull AnActionEvent event)