Decoupled mockup from CDM Library plug-in.
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor.designproposal1 / src / eu / etaxonomy / taxeditor / designproposal1 / Activator.java
1 package eu.etaxonomy.taxeditor.designproposal1;
2
3 import org.eclipse.jface.resource.ImageDescriptor;
4 import org.eclipse.swt.graphics.Image;
5 import org.eclipse.ui.plugin.AbstractUIPlugin;
6 import org.osgi.framework.BundleContext;
7
8 //import eu.etaxonomy.cdm.api.application.CdmApplicationController;
9
10
11 /**
12 * The activator class controls the plug-in life cycle
13 */
14 public class Activator extends AbstractUIPlugin {
15
16 // The plug-in ID
17 public static final String PLUGIN_ID = "eu.etaxonomy.mvctest";
18
19 // The shared instance
20 private static Activator plugin;
21
22 // private CdmApplicationController cdmApp = new CdmApplicationController();
23
24 /**
25 * The constructor
26 */
27 public Activator() {
28 }
29
30 /*
31 * (non-Javadoc)
32 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
33 */
34 public void start(BundleContext context) throws Exception {
35 super.start(context);
36 plugin = this;
37 }
38
39 /*
40 * (non-Javadoc)
41 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
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 Activator getDefault() {
54 return plugin;
55 }
56
57 /**
58 * Returns an image descriptor for the image file at the given
59 * plug-in relative path
60 *
61 * @param path the path
62 * @return the image descriptor
63 */
64 public static ImageDescriptor getImageDescriptor(String path) {
65 return imageDescriptorFromPlugin(PLUGIN_ID, path);
66 }
67
68
69 public Image getImage(String key) {
70 return getImageRegistry().get(key);
71 }
72
73 /**
74 * @return the objectList
75 */
76 // public CdmApplicationController getApplicationController() {
77 // return this.cdmApp;
78 // }
79
80
81 }