diff --git a/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java b/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java index 455a7212ca6f..dbb3cfdd6e5e 100644 --- a/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java +++ b/platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java @@ -28,6 +28,7 @@ import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleManager; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; +import com.intellij.openapi.progress.util.ProgressWrapper; import com.intellij.openapi.project.DumbModeTask; import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.Project; @@ -298,14 +299,23 @@ public class PushedFilePropertiesUpdaterImpl extends PushedFilePropertiesUpdater for(Runnable r:tasks) r.run(); return; } + + final ProgressIndicator progress = ProgressManager.getInstance().getProgressIndicator(); + assert progress != null; + final ConcurrentLinkedQueue tasksQueue = new ConcurrentLinkedQueue(tasks); Future result = null; if (tasks.size() > 1) { result = ApplicationManager.getApplication().executeOnPooledThread(new Runnable() { @Override public void run() { - Runnable runnable; - while ((runnable = tasksQueue.poll()) != null) runnable.run(); + ProgressManager.getInstance().runProcess(new Runnable() { + @Override + public void run() { + Runnable runnable; + while ((runnable = tasksQueue.poll()) != null) runnable.run(); + } + }, ProgressWrapper.wrap(progress)); } }); }