]> git.argeo.org Git - lgpl/argeo-commons.git/blob - server/plugins/org.argeo.jcr.ui.explorer/src/main/java/org/argeo/eclipse/ui/jcr/explorer/JcrExplorerPlugin.java
b5e9af31dff751b16a724ce023463b262639b66f
[lgpl/argeo-commons.git] / server / plugins / org.argeo.jcr.ui.explorer / src / main / java / org / argeo / eclipse / ui / jcr / explorer / JcrExplorerPlugin.java
1 package org.argeo.eclipse.ui.jcr.explorer;
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 JcrExplorerPlugin extends AbstractUIPlugin {
11
12 // The plug-in ID
13 public static final String ID = "org.argeo.jcr.ui.explorer"; //$NON-NLS-1$
14
15 // The shared instance
16 private static JcrExplorerPlugin plugin;
17
18 /**
19 * The constructor
20 */
21 public JcrExplorerPlugin() {
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 JcrExplorerPlugin getDefault() {
54 return plugin;
55 }
56
57 public static ImageDescriptor getImageDescriptor(String path) {
58 return imageDescriptorFromPlugin(ID, path);
59 }
60
61 }