]> git.argeo.org Git - gpl/argeo-slc.git/blob - eclipse/plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcClientRapPlugin.java
Adapt to changes in Commons
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.client.rap / src / main / java / org / argeo / slc / client / rap / SlcClientRapPlugin.java
1 package org.argeo.slc.client.rap;
2
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.ui.plugin.AbstractUIPlugin;
5 import org.osgi.framework.BundleContext;
6
7 /**
8 * The activator class controls the plug-in life cycle
9 */
10 public class SlcClientRapPlugin extends AbstractUIPlugin {
11
12 // The plug-in ID
13 public static final String PLUGIN_ID = "org.argeo.slc.client.rap"; //$NON-NLS-1$
14
15 // The shared instance
16 private static SlcClientRapPlugin plugin;
17
18 /**
19 * The constructor
20 */
21 public SlcClientRapPlugin() {
22 }
23
24 /*
25 * (non-Javadoc)
26 *
27 * @see
28 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
29 * )
30 */
31 public void start(BundleContext context) throws Exception {
32 super.start(context);
33 plugin = this;
34 }
35
36 /*
37 * (non-Javadoc)
38 *
39 * @see
40 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
41 * )
42 */
43 public void stop(BundleContext context) throws Exception {
44 plugin = null;
45 super.stop(context);
46 }
47
48 /**
49 * Returns the shared instance
50 *
51 * @return the shared instance
52 */
53 public static SlcClientRapPlugin getDefault() {
54 return plugin;
55 }
56
57 /**
58 * Returns an image descriptor for the image file at the given plug-in
59 * relative path
60 *
61 * @param path
62 * the path
63 * @return the image descriptor
64 */
65 public static ImageDescriptor getImageDescriptor(String path) {
66 return imageDescriptorFromPlugin(PLUGIN_ID, path);
67 }
68 }