void (Component comp, int x, int y) { ActionGroup actionGroup = new ActionGroup() { @Override public AnAction @NotNull [] getChildren(@Nullable AnActionEvent e) { if (e == null) return EMPTY_ARRAY; String popupGroupId = null; for (NavBarModelExtension modelExtension : NavBarModelExtension.EP_NAME.getExtensionList()) { popupGroupId = modelExtension.getPopupMenuGroup(NavBarPanel.this); if (popupGroupId != null) break; } if (popupGroupId == null) popupGroupId = IdeActions.GROUP_NAVBAR_POPUP; ActionGroup group = (ActionGroup)CustomActionsSchema.getInstance().getCorrectedAction(popupGroupId); return group == null ? EMPTY_ARRAY : group.getChildren(e); } }; ActionPopupMenu popupMenu = ActionManager.getInstance().createActionPopupMenu(ActionPlaces.NAVIGATION_BAR_POPUP, actionGroup); popupMenu.setTargetComponent(navBarPanel); JPopupMenu menu = popupMenu.getComponent(); if (index != -1 && !navBarPanel.isNodePopupActive()) { myModel.setSelectedIndex(index); } menu.show(isNodePopupActive() ? myNodePopup.getComponent() : navBarPanel, component.getX() + x, component.getY() + y); }