summaryrefslogtreecommitdiff
path: root/platform/lang-impl/src/com/intellij/execution/actions/StopAction.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/lang-impl/src/com/intellij/execution/actions/StopAction.java')
-rw-r--r--platform/lang-impl/src/com/intellij/execution/actions/StopAction.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/lang-impl/src/com/intellij/execution/actions/StopAction.java b/platform/lang-impl/src/com/intellij/execution/actions/StopAction.java
index 75466528ae2f..596b3900ba5b 100644
--- a/platform/lang-impl/src/com/intellij/execution/actions/StopAction.java
+++ b/platform/lang-impl/src/com/intellij/execution/actions/StopAction.java
@@ -56,7 +56,7 @@ class StopAction extends DumbAwareAction implements AnAction.TransparentUpdate {
Icon icon = getTemplatePresentation().getIcon();
String description = getTemplatePresentation().getDescription();
Presentation presentation = e.getPresentation();
- if (ActionPlaces.MAIN_MENU.equals(e.getPlace())) {
+ if (ActionPlaces.isMainMenuOrActionSearch(e.getPlace())) {
enable = !getCancellableProcesses(e.getProject()).isEmpty() || !getActiveDescriptors(e.getDataContext()).isEmpty();
presentation.setText(getTemplatePresentation().getText());
}
@@ -79,7 +79,8 @@ class StopAction extends DumbAwareAction implements AnAction.TransparentUpdate {
presentation.setText(getTemplatePresentation().getText());
}
else {
- presentation.setText(ExecutionBundle.message("stop.configuration.action.name", runProfile == null ? contentDescriptor.getDisplayName() : runProfile.getName()));
+ presentation.setText(ExecutionBundle.message("stop.configuration.action.name",
+ runProfile == null ? contentDescriptor.getDisplayName() : runProfile.getName()));
}
}
@@ -95,7 +96,7 @@ class StopAction extends DumbAwareAction implements AnAction.TransparentUpdate {
Project project = e.getProject();
List<Pair<TaskInfo, ProgressIndicator>> backgroundTasks = getCancellableProcesses(project);
- if (ActionPlaces.MAIN_MENU.equals(e.getPlace())) {
+ if (ActionPlaces.isMainMenuOrActionSearch(e.getPlace())) {
if (activeProcessHandler != null && !activeProcessHandler.isProcessTerminating() && !activeProcessHandler.isProcessTerminated()
&& backgroundTasks.isEmpty()) {
stopProcess(activeProcessHandler);