3e52b5d05e8f0b99e146f17601e4415b7bdc9017
[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 /*
32 * (non-Javadoc)
33 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
34 */
35 public void start(BundleContext context) throws Exception {
36 super.start(context);
37 plugin = this;
38 }
39
40 /*
41 * (non-Javadoc)
42 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
43 */
44 public void stop(BundleContext context) throws Exception {
45 plugin = null;
46 super.stop(context);
47 }
48
49 /**
50 * Returns the shared instance
51 *
52 * @return the shared instance
53 */
54 public static Activator getDefault() {
55 return plugin;
56 }
57
58 /**
59 * Returns an image descriptor for the image file at the given
60 * plug-in relative path
61 *
62 * @param path the path
63 * @return the image descriptor
64 */
65 public static ImageDescriptor getImageDescriptor(String path) {
66 return imageDescriptorFromPlugin(PLUGIN_ID, path);
67 }
68
69
70 public Image getImage(String key) {
71 return getImageRegistry().get(key);
72 }
73
74 /**
75 * @return the objectList
76 */
77 // public CdmApplicationController getApplicationController() {
78 // return this.cdmApp;
79 // }
80
81
82 }