EA-74920 - assert: SmartPointerManagerImpl.createSmartPsiElementPointer
authorAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 28 Oct 2015 11:00:17 +0000 (12:00 +0100)
committerAnna Kozlova <anna.kozlova@jetbrains.com>
Wed, 28 Oct 2015 15:04:59 +0000 (16:04 +0100)
platform/lang-impl/src/com/intellij/refactoring/changeSignature/MethodNodeBase.java

index 42be59976a9d12104de7798801079c8014119d97..247bee2e07263f9d0896b2c49d35d0fe1a93b9f8 100644 (file)
@@ -18,6 +18,7 @@ package com.intellij.refactoring.changeSignature;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.Computable;
 import com.intellij.openapi.util.Condition;
 import com.intellij.openapi.util.Iconable;
 import com.intellij.openapi.util.Ref;
@@ -27,6 +28,7 @@ import com.intellij.ui.CheckedTreeNode;
 import com.intellij.ui.ColoredTreeCellRenderer;
 import com.intellij.util.containers.ContainerUtil;
 
+import javax.swing.*;
 import javax.swing.tree.TreeNode;
 import java.util.*;
 
@@ -111,8 +113,13 @@ public abstract class MethodNodeBase<M extends PsiElement> extends CheckedTreeNo
 
   public void customizeRenderer(ColoredTreeCellRenderer renderer) {
     if (myMethod == null) return;
-    int flags = Iconable.ICON_FLAG_VISIBILITY | Iconable.ICON_FLAG_READ_STATUS;
-    renderer.setIcon(myMethod.getIcon(flags));
+    final int flags = Iconable.ICON_FLAG_VISIBILITY | Iconable.ICON_FLAG_READ_STATUS;
+    renderer.setIcon(ApplicationManager.getApplication().runReadAction(new Computable<Icon>() {
+      @Override
+      public Icon compute() {
+        return myMethod.getIcon(flags);
+      }
+    }));
 
     customizeRendererText(renderer);
   }