ActionGroup (final String place) { final ActionGroup original = myTabPopupActions != null ? myTabPopupActions : (ActionGroup)myActionManager.getAction(VIEW_POPUP); final ActionGroup focusPlaceholder = (ActionGroup)myActionManager.getAction("Runner.Focus"); DefaultActionGroup group = new DefaultActionGroup(VIEW_POPUP, original.isPopup()); if (myShowDebugContentAction == null && "Debug".equals(myRunnerId)) { myShowDebugContentAction = new ShowDebugContentAction(this, myTabs.getComponent(), this); } if (myShowDebugContentAction != null) { group.add(myShowDebugContentAction); } AnActionEvent event = new AnActionEvent(null, DataManager.getInstance().getDataContext(), place, new Presentation(), ActionManager.getInstance(), 0); for (AnAction each : original.getChildren(event)) { if (each == focusPlaceholder) { final AnAction[] focusActions = ((ActionGroup)each).getChildren(event); for (AnAction eachFocus : focusActions) { group.add(eachFocus); } if (myAdditionalFocusActions != null) { for (AnAction action : myAdditionalFocusActions.getChildren(event)) { group.add(action); } } } else { group.add(each); } } if (myViewActions.getChildrenCount() > 0) { DefaultActionGroup layoutGroup = new DefaultActionGroup(myViewActions.getChildren(null)); layoutGroup.getTemplatePresentation().setText(ExecutionBundle.messagePointer("action.presentation.RunnerContentUi.text")); layoutGroup.setPopup(true); group.addSeparator(); group.addAction(layoutGroup); } return group; }