]> git.argeo.org Git - gpl/argeo-slc.git/blob - plugins/org.argeo.slc.client.rap/src/main/java/org/argeo/slc/client/rap/SlcRapPlugin.java
Fix single sourcing issue on file download
[gpl/argeo-slc.git] / plugins / org.argeo.slc.client.rap / src / main / java / org / argeo / slc / client / rap / SlcRapPlugin.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 * Enable life-cycle management of RAP specific services
11 */
12 public class SlcRapPlugin extends AbstractUIPlugin {
13
14 // The plug-in ID
15 public static final String PLUGIN_ID = "org.argeo.slc.client.rap"; //$NON-NLS-1$
16
17 // The shared instance
18 private static SlcRapPlugin plugin;
19
20 /**
21 * The constructor
22 */
23 public SlcRapPlugin() {
24 }
25
26 /*
27 * (non-Javadoc)
28 *
29 * @see
30 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
31 * )
32 */
33 public void start(BundleContext context) throws Exception {
34 super.start(context);
35 plugin = this;
36 }
37
38 /*
39 * (non-Javadoc)
40 *
41 * @see
42 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
43 * )
44 */
45 public void stop(BundleContext context) throws Exception {
46 plugin = null;
47 super.stop(context);
48 }
49
50 /**
51 * Returns the shared instance
52 *
53 * @return the shared instance
54 */
55 public static SlcRapPlugin getDefault() {
56 return plugin;
57 }
58
59 /**
60 * Returns an image descriptor for the image file at the given plug-in
61 * relative path
62 *
63 * @param path
64 * the path
65 * @return the image descriptor
66 */
67 public static ImageDescriptor getImageDescriptor(String path) {
68 return imageDescriptorFromPlugin(PLUGIN_ID, path);
69 }
70
71 }