Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2013-12-05 08:40:55 -0500
committerDani Megert2013-12-05 08:40:55 -0500
commit8cd1c1abdcce26766e598687781fdf4edaee0e70 (patch)
tree21bd1c97298a989e9564ab2aab432f893c5e7513
parent07203aeb9801a0ac0d89e3cb4e6c0811184b62ee (diff)
downloadeclipse.platform.debug-I20131212-1600.tar.gz
eclipse.platform.debug-I20131212-1600.tar.xz
eclipse.platform.debug-I20131212-1600.zip
For details see bug 417765, comment 3.
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java
index f82f2c25f..caecfc274 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/model/ImageDescriptorRegistry.java
@@ -11,19 +11,23 @@
package org.eclipse.ui.externaltools.internal.model;
+import java.util.Collections;
import java.util.HashMap;
+import java.util.Map;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.core.runtime.Assert;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
/**
* A registry that maps <code>ImageDescriptors</code> to <code>Image</code>.
*/
public class ImageDescriptorRegistry {
- private HashMap<ImageDescriptor, Image> fRegistry = new HashMap<ImageDescriptor, Image>(10);
+ private Map<ImageDescriptor, Image> fRegistry = Collections.synchronizedMap(new HashMap<ImageDescriptor, Image>(10));
private Display fDisplay;
/**
@@ -78,10 +82,16 @@ public class ImageDescriptorRegistry {
}
private void hookDisplay() {
- fDisplay.disposeExec(new Runnable() {
+ fDisplay.asyncExec(new Runnable() {
@Override
public void run() {
- dispose();
+ fDisplay.disposeExec(new Runnable() {
+
+ @Override
+ public void run() {
+ dispose();
+ }
+ });
}
});
}

Back to the top