Code cleanup
authorVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Thu, 19 Feb 2015 11:33:54 +0000 (14:33 +0300)
committerVassiliy.Kudryashov <Vassiliy.Kudryashov@jetbrains.com>
Thu, 19 Feb 2015 11:35:11 +0000 (14:35 +0300)
platform/lang-impl/src/com/intellij/execution/ui/RunContentManagerImpl.java

index 8be73d464d26984c840dd62f40b93aa63a6ab9c3..916e5889d756a7f906148cdd3977ed6c475d30c3 100644 (file)
@@ -310,8 +310,6 @@ public class RunContentManagerImpl implements RunContentManager, Disposable {
           ApplicationManager.getApplication().invokeLater(new Runnable() {
             @Override
             public void run() {
-              final Icon icon = descriptor.getIcon();
-
               boolean alive = false;
               String toolWindowId = executor.getToolWindowId();
               ContentManager manager = myToolwindowIdToContentManagerMap.get(toolWindowId);
@@ -325,17 +323,11 @@ public class RunContentManagerImpl implements RunContentManager, Disposable {
                   }
                 }
               }
+              Icon base = myToolwindowIdToBaseIconMap.get(toolWindowId);
+              toolWindow.setIcon(alive ? getLiveIndicator(base) : base);
 
-              final boolean finalAlive = alive;
-              UIUtil.invokeLaterIfNeeded(new Runnable() {
-                @Override
-                public void run() {
-                  toolWindow.setIcon(finalAlive
-                                     ? getLiveIndicator(myToolwindowIdToBaseIconMap.get(executor.getToolWindowId()))
-                                     : myToolwindowIdToBaseIconMap.get(executor.getToolWindowId()));
-                  content.setIcon(icon == null ? executor.getDisabledIcon() : IconLoader.getTransparentIcon(icon));
-                }
-              });
+              Icon icon = descriptor.getIcon();
+              content.setIcon(icon == null ? executor.getDisabledIcon() : IconLoader.getTransparentIcon(icon));
             }
           });
         }