Fix IdeRepaintManager.checkThreadViolations failure
authorVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Thu, 16 Oct 2014 10:31:02 +0000 (14:31 +0400)
committerVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Thu, 16 Oct 2014 10:31:19 +0000 (14:31 +0400)
platform/lang-impl/src/com/intellij/codeInsight/navigation/ListBackgroundUpdaterTask.java

index 56ce15b1a8c2de4926407a520ae7b5be20f45475..eb9abc45132965f1cfd866d7cbc0bc1f999d18cf 100644 (file)
@@ -19,6 +19,7 @@ import com.intellij.openapi.project.Project;
 import com.intellij.psi.PsiElement;
 import com.intellij.ui.components.JBList;
 import com.intellij.ui.speedSearch.NameFilteringListModel;
+import com.intellij.util.ui.UIUtil;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -34,7 +35,12 @@ public abstract class ListBackgroundUpdaterTask extends BackgroundUpdaterTask<JB
 
   @Override
   protected void paintBusy(final boolean paintBusy) {
-    myComponent.setPaintBusy(paintBusy);
+    UIUtil.invokeLaterIfNeeded(new Runnable() {
+      @Override
+      public void run() {
+        myComponent.setPaintBusy(paintBusy);
+      }
+    });
   }
 
   @Override