void (@Nullable Executor executor, @Nullable RunnerAndConfigurationSettings selected) { myExecutor = executor; JBOptionButton button = (JBOptionButton)Objects.requireNonNull(getButton(Objects.requireNonNull(myRunAction))); button.setVisible(executor != null && myDataContext != null); button.setEnabled(executor != null && myDataContext != null); if (executor != null) { myRunAction.putValue(Action.NAME, executor.getActionName()); button.setText(executor.getActionName()); button.setIcon(executor.getIcon()); myExecutorActions.forEach(action -> action.unregisterCustomShortcutSet(getContentPanel())); myExecutorActions.clear(); if (selected != null) { ExecutorRegistryImpl.ExecutorAction action = createAction(selected, executor); DefaultActionGroup group = new DefaultActionGroup(); RunConfigurationsComboBoxAction.addExecutorActions(group, exec -> createAction(selected, exec), exec -> exec != executor); button.setOptions(Arrays.asList(group.getChildren(null))); button.setToolTipText(UIUtil.removeMnemonic(executor.getStartActionText(selected.getName())) + " (" + KeymapUtil.getFirstKeyboardShortcutText(action) + ")"); } } }