IDEA-68104 hg ui-lock. Use pooled thread istead of modal task.
authorKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 20 Apr 2011 13:15:58 +0000 (17:15 +0400)
committerKirill Likhodedov <kirill.likhodedov@jetbrains.com>
Wed, 20 Apr 2011 15:03:57 +0000 (19:03 +0400)
plugins/hg4idea/src/org/zmlx/hg4idea/action/HgRunConflictResolverAction.java

index 7e6802a7c6a6ff76b4efb19fea3c8f9f4cbb7dae..f7f71b019d34ce2ddedf7ac4120de1803263f0b4 100644 (file)
 // limitations under the License.
 package org.zmlx.hg4idea.action;
 
-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.vfs.VirtualFile;
-import org.jetbrains.annotations.NotNull;
 import org.zmlx.hg4idea.provider.update.HgConflictResolver;
 import org.zmlx.hg4idea.ui.HgRunConflictResolverDialog;
 
@@ -63,12 +61,12 @@ public class HgRunConflictResolverAction extends HgAbstractGlobalAction {
       }
 
       public void execute() {
-        new Task.Modal(project, "Mercurial resolves conflicts", false) {
+        ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
           @Override
-          public void run(@NotNull ProgressIndicator indicator) {
+          public void run() {
             new HgConflictResolver(project).resolve(repository);
           }
-        }.queue();
+        });
       }
     };
   }