summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2011-07-26 15:03:58 (EDT)
committerHenrik Rentz-Reichert2011-07-26 15:03:58 (EDT)
commit3b2a7dd687a30405ef9f13a50e086c5790725cae (patch)
treeb67a9767c1b842fcdb80133a2a97bf69894665ae
parent924941064b09a0f0b01ade85a57ced5fd1c03e84 (diff)
downloadorg.eclipse.etrice-3b2a7dd687a30405ef9f13a50e086c5790725cae.zip
org.eclipse.etrice-3b2a7dd687a30405ef9f13a50e086c5790725cae.tar.gz
org.eclipse.etrice-3b2a7dd687a30405ef9f13a50e086c5790725cae.tar.bz2
[ui.behavior, ui.structure] bug fixes in Activators
-rw-r--r--plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/Activator.java10
-rw-r--r--plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/Activator.java10
2 files changed, 6 insertions, 14 deletions
diff --git a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/Activator.java b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/Activator.java
index e384bec..f3b1e2e 100644
--- a/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/Activator.java
+++ b/plugins/org.eclipse.etrice.ui.behavior/src/org/eclipse/etrice/ui/behavior/Activator.java
@@ -13,7 +13,6 @@
package org.eclipse.etrice.ui.behavior;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -29,8 +28,6 @@ public class Activator extends AbstractUIPlugin {
// The shared instance
private static Activator plugin;
- private ImageRegistry imageRegistry = new ImageRegistry();
-
/**
* The constructor
*/
@@ -51,7 +48,6 @@ public class Activator extends AbstractUIPlugin {
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- plugin.imageRegistry.dispose();
plugin = null;
super.stop(context);
}
@@ -74,14 +70,14 @@ public class Activator extends AbstractUIPlugin {
* @return the image descriptor
*/
public static Image getImage(String path) {
- Image img = getDefault().imageRegistry.get(path);
+ Image img = getDefault().getImageRegistry().get(path);
if (img==null) {
ImageDescriptor desc = imageDescriptorFromPlugin(PLUGIN_ID, path);
if (desc==null)
System.err.println("image not found: "+path);
else {
- getDefault().imageRegistry.put(path, desc);
- getDefault().imageRegistry.get(path);
+ getDefault().getImageRegistry().put(path, desc);
+ getDefault().getImageRegistry().get(path);
}
}
return img;
diff --git a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/Activator.java b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/Activator.java
index 67a23d4..6b6ed75 100644
--- a/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/Activator.java
+++ b/plugins/org.eclipse.etrice.ui.structure/src/org/eclipse/etrice/ui/structure/Activator.java
@@ -14,7 +14,6 @@ package org.eclipse.etrice.ui.structure;
import org.osgi.framework.BundleContext;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -26,8 +25,6 @@ public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.etrice.ui.structure";
- private ImageRegistry imageRegistry = new ImageRegistry();
-
/*
* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
@@ -42,7 +39,6 @@ public class Activator extends AbstractUIPlugin {
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
- plugin.imageRegistry.dispose();
plugin = null;
super.stop(context);
}
@@ -65,14 +61,14 @@ public class Activator extends AbstractUIPlugin {
* @return the image descriptor
*/
public static Image getImage(String path) {
- Image img = getDefault().imageRegistry.get(path);
+ Image img = getDefault().getImageRegistry().get(path);
if (img==null) {
ImageDescriptor desc = imageDescriptorFromPlugin(PLUGIN_ID, path);
if (desc==null)
System.err.println("image not found: "+path);
else {
- getDefault().imageRegistry.put(path, desc);
- getDefault().imageRegistry.get(path);
+ getDefault().getImageRegistry().put(path, desc);
+ getDefault().getImageRegistry().get(path);
}
}
return img;