no move refactoring in dumb mode (EA-65018 - INRE: FileBasedIndexImpl.handleDumbMode)
authorpeter <peter@jetbrains.com>
Wed, 18 Feb 2015 11:42:16 +0000 (12:42 +0100)
committerpeter <peter@jetbrains.com>
Wed, 18 Feb 2015 15:18:42 +0000 (16:18 +0100)
platform/lang-impl/src/com/intellij/refactoring/move/moveFilesOrDirectories/MoveFilesOrDirectoriesDialog.java

index 76c07b93ffe95eb4274f28e41a6e656197d23b03..d9e36caf71906d4bd382eaa01b734c856e71b120 100644 (file)
@@ -27,6 +27,7 @@ import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
 import com.intellij.openapi.fileChooser.FileChooserFactory;
 import com.intellij.openapi.help.HelpManager;
 import com.intellij.openapi.keymap.KeymapUtil;
+import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.DialogWrapper;
 import com.intellij.openapi.ui.TextComponentAccessor;
@@ -195,6 +196,12 @@ public class MoveFilesOrDirectoriesDialog extends DialogWrapper {
     //myTargetDirectoryField.getChildComponent().addCurrentTextToHistory();
     RecentsManager.getInstance(myProject).registerRecentEntry(RECENT_KEYS, myTargetDirectoryField.getChildComponent().getText());
     RefactoringSettings.getInstance().MOVE_SEARCH_FOR_REFERENCES_FOR_FILE = myCbSearchForReferences.isSelected();
+
+    if (DumbService.isDumb(myProject)) {
+      DumbService.getInstance(myProject).showDumbModeNotification("Move refactoring is not available while indexing is in process");
+      return;
+    }
+    
     CommandProcessor.getInstance().executeCommand(myProject, new Runnable() {
       @Override
       public void run() {