X-Git-Url: http://git.argeo.org/?p=gpl%2Fargeo-suite.git;a=blobdiff_plain;f=org.argeo.suite.workbench.rap%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fworkbench%2FAsUiPlugin.java;fp=org.argeo.suite.workbench.rap%2Fsrc%2Forg%2Fargeo%2Fsuite%2Fworkbench%2FAsUiPlugin.java;h=0000000000000000000000000000000000000000;hp=7cb1885931c1c7ab2db3ac8375e5cc39523e3856;hb=9b434abf555b36bbdb51729742f70f25b7abd5a3;hpb=a4592339d582315077ae7bb87043a6ec7a8bd4a2 diff --git a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/AsUiPlugin.java b/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/AsUiPlugin.java deleted file mode 100644 index 7cb1885..0000000 --- a/org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/AsUiPlugin.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.argeo.suite.workbench; - -import java.net.URL; - -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; - -/** The activator class controls the plug-in life cycle */ -public class AsUiPlugin extends AbstractUIPlugin { - - public static final String PLUGIN_ID = "org.argeo.suite.workbench.rap"; - - // The shared instance - private static AsUiPlugin plugin; - - private BundleContext bundleContext; - - /** Default constructor */ - public AsUiPlugin() { - } - - public void start(BundleContext context) throws Exception { - super.start(context); - this.bundleContext = context; - plugin = this; - } - - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static AsUiPlugin getDefault() { - return plugin; - } - - /** Creates the image */ - public static Image img(String path) { - return getImageDescriptor(path).createImage(); - } - - /** - * Returns an image descriptor for the image file at the given plug-in - * relative path - * - * @param path - * the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public URL imageUrl(String path) { - return bundleContext.getBundle().getResource(path); - } - - @Override - protected void initializeImageRegistry(ImageRegistry reg) { - } - - public BundleContext getBundleContext() { - return bundleContext; - } -}