GitIgnoreTracker: execute on pooled thread, don't create progressive tasks for scanni...
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Mon, 4 Apr 2011 11:28:00 +0000 (15:28 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Mon, 4 Apr 2011 11:28:00 +0000 (15:28 +0400)
plugins/git4idea/src/git4idea/vfs/GitIgnoreTracker.java

index 18cde8f5dfbea1ceddf809a517283056b0d8d37e..b9e55862a04aa525443e53d79c5cd29fb3c5f4f5 100644 (file)
@@ -16,8 +16,7 @@
 
 package git4idea.vfs;
 
-import com.intellij.openapi.progress.ProgressIndicator;
-import com.intellij.openapi.progress.Task;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.SystemInfo;
 import com.intellij.openapi.vcs.ProjectLevelVcsManager;
@@ -153,9 +152,9 @@ public class GitIgnoreTracker {
    * This method is invoked when component is started or when vcs root mapping changes.
    */
   public void scan() {
-    GitVcs.runInBackground(new Task.Backgroundable(myProject, "Scanning ignored files...") {
+    ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
       @Override
-      public void run(@NotNull ProgressIndicator indicator) {
+      public void run() {
         VirtualFile[] contentRoots = myVcsManager.getRootsUnderVcs(myVcs);
         if (contentRoots == null || contentRoots.length == 0) {
           return;