Merge branch 'master' of git@git.labs.intellij.net:idea/community
authorKirill Kalishev <kirill.kalishev@jetbrains.com>
Mon, 26 Apr 2010 12:47:28 +0000 (16:47 +0400)
committerKirill Kalishev <kirill.kalishev@jetbrains.com>
Mon, 26 Apr 2010 12:47:28 +0000 (16:47 +0400)
platform/lang-impl/src/com/intellij/ui/DeferredIconImpl.java
plugins/InspectionGadgets/testsrc/com/IGInspectionTestCase.java

index 9b8395040c433bcd8a5e0ccbaef2a65018362c78..a11affc7279c436415d04a6e2aa74bf3b02f6091 100644 (file)
@@ -107,7 +107,10 @@ public class DeferredIconImpl<T> implements DeferredIcon {
                   final TreeUI ui = ((JTree)target).getUI();
                   if (ui instanceof BasicTreeUI) {
                     // yep, reset size cache
-                    ((BasicTreeUI)ui).setLeftChildIndent(((Integer)UIManager.get("Tree.leftChildIndent")).intValue());
+                    int indent = ((Integer)UIManager.get("Tree.leftChildIndent")).intValue();
+                    if (((BasicTreeUI)ui).getLeftChildIndent() != indent) {
+                      ((BasicTreeUI)ui).setLeftChildIndent(indent);
+                    }
                   }
                 }
               }
index 017fb3ff5e97997e6d2bee11d31e8b7d0182d47f..188869411d5e84f6146d789c3584171b157f1e43 100644 (file)
@@ -10,6 +10,12 @@ import org.jetbrains.annotations.NonNls;
  * @author Alexey
  */
 public abstract class IGInspectionTestCase extends InspectionTestCase {
+
+  @SuppressWarnings({"JUnitTestCaseWithNonTrivialConstructors"})
+  public IGInspectionTestCase() {
+    System.setProperty("idea.platform.prefix", "Idea");
+  }
+
   protected String getTestDataPath() {
       return PluginPathManager.getPluginHomePath("InspectionGadgets") + "/test";
   }