void () { List<AnAction> specialActions = new ArrayList<>(); for (AnAction action : myViewActions.getChildren(null)) { if (!(action instanceof ViewLayoutModificationAction)) specialActions.add(action); } if (myMinimizeActionEnabled) { if (specialActions.isEmpty()) { var separateWatchesInVariables = ActionManager.getInstance().getAction("XDebugger.SwitchWatchesInVariables"); if (separateWatchesInVariables instanceof ToggleAction) { myViewActions.addAction(new Separator()).setAsSecondary(true); myViewActions.addAction(new ToggleSeparateWatches((ToggleAction)separateWatchesInVariables, true)).setAsSecondary(true); } myViewActions.addAction(new Separator()).setAsSecondary(true); myViewActions.addAction(ActionManager.getInstance().getAction("Runner.ToggleTabLabels")).setAsSecondary(true); myViewActions.addAction(ActionManager.getInstance().getAction("Runner.RestoreLayout")).setAsSecondary(true); } } else { for (AnAction action : specialActions) { myViewActions.remove(action); } } }