void (@NotNull AnActionEvent event) { Presentation presentation = event.getPresentation(); ExecutionEnvironment environment = getEnvironment(event); if (environment != null) { presentation.setText(ExecutionBundle.messagePointer("rerun.configuration.action.name", StringUtil.escapeMnemonics(environment.getRunProfile().getName()))); Icon icon = ExecutionManagerImpl.isProcessRunning(getDescriptor(event)) ? AllIcons.Actions.Restart : myProgressListener instanceof BuildViewManager ? AllIcons.Actions.Compile : environment.getExecutor().getIcon(); presentation.setIcon(icon); presentation.setEnabled(isEnabled(event)); return; } presentation.setEnabled(false); }