From 114cbb2fbbc564fbf5dd0f2c6b6ebe4cc821711e Mon Sep 17 00:00:00 2001 From: "Vladislav.Soroka" Date: Fri, 20 Sep 2013 17:00:29 +0400 Subject: [PATCH] IDEA-113861 Gradle: it could be possible to hide 'Gradle: download' progress to the background --- .../externalSystem/util/ExternalSystemUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java index 3750bffe610d..9e75f7f6dcfc 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java @@ -47,8 +47,8 @@ import com.intellij.openapi.externalSystem.settings.AbstractExternalSystemLocalS import com.intellij.openapi.externalSystem.settings.AbstractExternalSystemSettings; import com.intellij.openapi.externalSystem.settings.ExternalProjectSettings; import com.intellij.openapi.module.Module; +import com.intellij.openapi.progress.PerformInBackgroundOption; import com.intellij.openapi.progress.ProgressIndicator; -import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.progress.Task; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ex.ProjectRootManagerEx; @@ -461,21 +461,21 @@ public class ExternalSystemUtil { public void run() { if (modal) { String title = ExternalSystemBundle.message("progress.import.text", projectName, externalSystemId.getReadableName()); - ProgressManager.getInstance().run(new Task.Modal(project, title, true) { + new Task.Backgroundable(project, title, true, PerformInBackgroundOption.DEAF) { @Override public void run(@NotNull ProgressIndicator indicator) { refreshProjectStructureTask.execute(indicator); } - }); + }.queue(); } else { String title = ExternalSystemBundle.message("progress.refresh.text", projectName, externalSystemId.getReadableName()); - ProgressManager.getInstance().run(new Task.Backgroundable(project, title) { + new Task.Backgroundable(project, title) { @Override public void run(@NotNull ProgressIndicator indicator) { refreshProjectStructureTask.execute(indicator); } - }); + }.queue(); } } });