Author: bbrodt
Date: 2010-11-30 14:25:57 -0500 (Tue, 30 Nov 2010)
New Revision: 27034
Modified:
trunk/bpel/plugins/org.eclipse.bpel.common.ui/src/org/eclipse/bpel/common/ui/CommonUIPlugin.java
Log:
https://jira.jboss.org/browse/JBIDE-7762
Modified:
trunk/bpel/plugins/org.eclipse.bpel.common.ui/src/org/eclipse/bpel/common/ui/CommonUIPlugin.java
===================================================================
---
trunk/bpel/plugins/org.eclipse.bpel.common.ui/src/org/eclipse/bpel/common/ui/CommonUIPlugin.java 2010-11-30
19:24:36 UTC (rev 27033)
+++
trunk/bpel/plugins/org.eclipse.bpel.common.ui/src/org/eclipse/bpel/common/ui/CommonUIPlugin.java 2010-11-30
19:25:57 UTC (rev 27034)
@@ -48,14 +48,16 @@
private static CommonUIPlugin plugin;
private ColorRegistry colorRegistry;
- protected boolean imagesAndColorsInitialized;
+ //
https://jira.jboss.org/browse/JBIDE-7762
+ // simplify, simplify, simplify!
+ private ImageRegistry imageRegistry;
+
/**
* The constructor.
*/
public CommonUIPlugin() {
plugin = this;
- imagesAndColorsInitialized = false;
}
/**
@@ -101,9 +103,11 @@
@Override
//
https://jira.jboss.org/browse/JBIDE-7724
public synchronized ImageRegistry getImageRegistry() {
- ImageRegistry result = super.getImageRegistry();
- initialize();
- return result;
+ if (imageRegistry == null) {
+ imageRegistry = super.getImageRegistry();
+ initializeImages(Display.getCurrent());
+ }
+ return imageRegistry;
}
/**
@@ -114,7 +118,7 @@
public synchronized ColorRegistry getColorRegistry() {
if (colorRegistry == null) {
colorRegistry = new ColorRegistry();
- initialize();
+ registerColors(Display.getCurrent());
}
return colorRegistry;
}
@@ -200,15 +204,6 @@
colorRegistry.put(ICommonUIConstants.COLOR_SELECTION_HANDLE_CORNER,
ColorUtils.getLightShade(selectionColor.getRGB(), 2, 3));
}
- protected void initialize() {
- if (!imagesAndColorsInitialized) {
- imagesAndColorsInitialized = true;
- Display display = Display.getCurrent();
- initializeImages(display);
- registerColors(display);
- }
- }
-
/**
* Method to create an error status object and write an error message to the log
* based on the passed boolean value.