void (@NotNull Presentation presentation, @NotNull Presentation templatePresentation, @Nullable ProcessHandler processHandler) { boolean enable = false; Icon icon = templatePresentation.getIcon(); String description = templatePresentation.getDescription(); if (processHandler != null && !processHandler.isProcessTerminated()) { enable = true; if (processHandler.isProcessTerminating() && processHandler instanceof KillableProcess killableProcess) { if (killableProcess.canKillProcess()) { // 'force quite' action presentation icon = AllIcons.Debugger.KillProcess; description = ExecutionBundle.message("action.terminating.process.progress.kill.description"); } } } presentation.setEnabled(enable); presentation.setIcon(icon); presentation.setDescription(description); }