don't show run configuration popup in dumb mode (EA-65028 - INRE: FileBasedIndexImpl...
authorpeter <peter@jetbrains.com>
Wed, 18 Feb 2015 11:11:11 +0000 (12:11 +0100)
committerpeter <peter@jetbrains.com>
Wed, 18 Feb 2015 15:18:40 +0000 (16:18 +0100)
platform/lang-impl/src/com/intellij/execution/actions/BaseRunConfigurationAction.java

index beb8b10954d52efc68e8d9f8cbcdc0a642ded179..322204b738d35e0334e16960471a34e1a9a43fe1 100644 (file)
@@ -26,6 +26,8 @@ import com.intellij.execution.configurations.RunConfiguration;
 import com.intellij.openapi.actionSystem.*;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Editor;
+import com.intellij.openapi.project.DumbService;
+import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.popup.JBPopupFactory;
 import com.intellij.openapi.ui.popup.ListPopup;
 import com.intellij.openapi.ui.popup.PopupStep;
@@ -108,6 +110,11 @@ public abstract class BaseRunConfigurationAction extends ActionGroup {
 
   @Override
   public boolean canBePerformed(DataContext dataContext) {
+    Project project = CommonDataKeys.PROJECT.getData(dataContext);
+    if (project != null && DumbService.isDumb(project)) {
+      return false;
+    }
+
     final ConfigurationContext context = ConfigurationContext.getFromContext(dataContext);
     final RunnerAndConfigurationSettings existing = context.findExisting();
     if (existing == null) {