diff --git a/platform/lang-impl/src/com/intellij/execution/actions/PauseOutputAction.java b/platform/lang-impl/src/com/intellij/execution/actions/PauseOutputAction.java index 0106fcae9117..937eaaa3868f 100644 --- a/platform/lang-impl/src/com/intellij/execution/actions/PauseOutputAction.java +++ b/platform/lang-impl/src/com/intellij/execution/actions/PauseOutputAction.java @@ -42,23 +42,24 @@ public class PauseOutputAction extends ToggleAction implements DumbAware { public void update(@NotNull AnActionEvent event) { super.update(event); final Presentation presentation = event.getPresentation(); - RunContentDescriptor descriptor = StopAction.getRecentlyStartedContentDescriptor(event.getDataContext()); - ProcessHandler handler = descriptor != null ? descriptor.getProcessHandler() : null; - if (handler != null && !handler.isProcessTerminated()) { - presentation.setEnabled(true); + ConsoleView consoleView = getConsoleView(event); + if (consoleView == null || !consoleView.canPause()) { + presentation.setEnabled(false); + return; + } + if (!consoleView.hasDeferredOutput()) { + presentation.setEnabled(false); } else { - ConsoleView consoleView = getConsoleView(event); - if (consoleView == null || !consoleView.canPause()) { - presentation.setEnabled(false); - return; - } - if (!consoleView.hasDeferredOutput()) { - presentation.setEnabled(false); - } - else { + RunContentDescriptor descriptor = StopAction.getRecentlyStartedContentDescriptor(event.getDataContext()); + ProcessHandler handler = descriptor != null ? descriptor.getProcessHandler() : null; + if (handler != null && !handler.isProcessTerminated()) { presentation.setEnabled(true); } + else { + presentation.setEnabled(false); + } } + } } \ No newline at end of file