diff options
author | Uwe Stieber | 2012-07-27 05:25:58 +0000 |
---|---|---|
committer | Uwe Stieber | 2012-07-27 05:32:42 +0000 |
commit | 9ff5696b324a908d0c7f85df444efe2f9421713e (patch) | |
tree | 84a72fefb1daa9b5a0bf9fe9818cad142519a1d2 | |
parent | 080607091967b480512ecf721103fdc77c0947ac (diff) | |
download | org.eclipse.tcf-9ff5696b324a908d0c7f85df444efe2f9421713e.tar.gz org.eclipse.tcf-9ff5696b324a908d0c7f85df444efe2f9421713e.tar.xz org.eclipse.tcf-9ff5696b324a908d0c7f85df444efe2f9421713e.zip |
Target Explorer: Fix Bug 386096 - Deadlock in org.eclipse.tcf.te.ui.activator.UIPlugin
-rw-r--r-- | target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java index f1995b425..d839a20e0 100644 --- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java +++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/activator/UIPlugin.java @@ -24,6 +24,7 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.tcf.te.runtime.tracing.TraceHandler; import org.eclipse.tcf.te.ui.interfaces.ImageConsts; import org.eclipse.tcf.te.ui.jface.images.AbstractImageDescriptor; +import org.eclipse.tcf.te.ui.swt.DisplayUtil; import org.eclipse.tcf.te.ui.trees.ViewerStateManager; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.plugin.AbstractUIPlugin; @@ -49,7 +50,7 @@ public class UIPlugin extends AbstractUIPlugin { /** * Load the pending images used to animate. */ - private void loadPendingImages() { + /* default */ void loadPendingImages() { SafeRunner.run(new ISafeRunnable() { @Override public void handleException(Throwable exception) { @@ -118,7 +119,13 @@ public class UIPlugin extends AbstractUIPlugin { public void start(BundleContext context) throws Exception { super.start(context); plugin = this; - loadPendingImages(); + // Images should be loaded in the UI thread + DisplayUtil.safeAsyncExec(new Runnable() { + @Override + public void run() { + loadPendingImages(); + } + }); // Load the tree viewer's state. ViewerStateManager.getInstance().loadViewerStates(); } |