allow bg dumb mode in SelectFilesDialog (EA-72850 - Throwable: DumbServiceImpl.schedu...
authorpeter <peter@jetbrains.com>
Wed, 28 Oct 2015 17:27:07 +0000 (18:27 +0100)
committerpeter <peter@jetbrains.com>
Wed, 28 Oct 2015 17:52:56 +0000 (18:52 +0100)
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/SelectFilesDialog.java

index 8806e4544a9cdffa1d18a39b313beff47cdddf4f..b697063b41f969ad11ddd96afb992a3b14706abb 100644 (file)
@@ -21,6 +21,8 @@ import com.google.common.collect.Collections2;
 import com.intellij.ide.DeleteProvider;
 import com.intellij.openapi.actionSystem.*;
 import com.intellij.openapi.fileChooser.actions.VirtualFileDeleteProvider;
+import com.intellij.openapi.project.DumbModePermission;
+import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vcs.VcsShowConfirmationOption;
 import com.intellij.openapi.vcs.changes.actions.DeleteUnversionedFilesAction;
@@ -93,6 +95,16 @@ public class SelectFilesDialog extends AbstractSelectFilesDialog<VirtualFile> {
     return defaultGroup;
   }
 
+  @Override
+  public void show() {
+    DumbService.allowStartingDumbModeInside(DumbModePermission.MAY_START_BACKGROUND, new Runnable() {
+      @Override
+      public void run() {
+        SelectFilesDialog.super.show();
+      }
+    });
+  }
+
   public static class VirtualFileList extends ChangesTreeList<VirtualFile> {
     private final Project myProject;
     @Nullable private final DeleteProvider myDeleteProvider;