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