]> git.argeo.org Git - lgpl/argeo-commons.git/blob - security/plugins/org.argeo.security.ui.admin/src/main/java/org/argeo/security/ui/admin/SecurityAdminPlugin.java
Split security UI to security admin ui
[lgpl/argeo-commons.git] / security / plugins / org.argeo.security.ui.admin / src / main / java / org / argeo / security / ui / admin / SecurityAdminPlugin.java
1 package org.argeo.security.ui.admin;
2
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.ui.plugin.AbstractUIPlugin;
5 import org.osgi.framework.BundleContext;
6
7 public class SecurityAdminPlugin extends AbstractUIPlugin {
8
9 // The plug-in ID
10 public static final String PLUGIN_ID = "org.argeo.security.ui.admin"; //$NON-NLS-1$
11
12 // The shared instance
13 private static SecurityAdminPlugin plugin;
14
15 /**
16 * The constructor
17 */
18 public SecurityAdminPlugin() {
19 }
20
21 /*
22 * (non-Javadoc)
23 *
24 * @see
25 * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
26 * )
27 */
28 public void start(BundleContext context) throws Exception {
29 super.start(context);
30 plugin = this;
31 }
32
33 /*
34 * (non-Javadoc)
35 *
36 * @see
37 * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
38 * )
39 */
40 public void stop(BundleContext context) throws Exception {
41 plugin = null;
42 super.stop(context);
43 }
44
45 /**
46 * Returns the shared instance
47 *
48 * @return the shared instance
49 */
50 public static SecurityAdminPlugin getDefault() {
51 return plugin;
52 }
53
54 public static ImageDescriptor getImageDescriptor(String path) {
55 return imageDescriptorFromPlugin(PLUGIN_ID, path);
56 }
57
58 }