+package org.argeo.slc.client.rap;\r
+\r
+import org.eclipse.jface.resource.ImageDescriptor;\r
+import org.eclipse.ui.plugin.AbstractUIPlugin;\r
+import org.osgi.framework.BundleContext;\r
+\r
+/**\r
+ * The activator class controls the plug-in life cycle\r
+ */\r
+public class SlcClientRapPlugin extends AbstractUIPlugin {\r
+\r
+ // The plug-in ID\r
+ public static final String PLUGIN_ID = "org.argeo.slc.client.rap"; //$NON-NLS-1$\r
+\r
+ // The shared instance\r
+ private static SlcClientRapPlugin plugin;\r
+\r
+ /**\r
+ * The constructor\r
+ */\r
+ public SlcClientRapPlugin() {\r
+ }\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext\r
+ * )\r
+ */\r
+ public void start(BundleContext context) throws Exception {\r
+ super.start(context);\r
+ plugin = this;\r
+ }\r
+\r
+ /*\r
+ * (non-Javadoc)\r
+ * \r
+ * @see\r
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext\r
+ * )\r
+ */\r
+ public void stop(BundleContext context) throws Exception {\r
+ plugin = null;\r
+ super.stop(context);\r
+ }\r
+\r
+ /**\r
+ * Returns the shared instance\r
+ * \r
+ * @return the shared instance\r
+ */\r
+ public static SlcClientRapPlugin getDefault() {\r
+ return plugin;\r
+ }\r
+\r
+ /**\r
+ * Returns an image descriptor for the image file at the given plug-in\r
+ * relative path\r
+ * \r
+ * @param path\r
+ * the path\r
+ * @return the image descriptor\r
+ */\r
+ public static ImageDescriptor getImageDescriptor(String path) {\r
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);\r
+ }\r
+}\r