renamed packages from "*prototype*" to "*designproposal*"
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor.designproposal1 / src / eu / etaxonomy / taxeditor / prototype1 / Activator.java
1 package eu.etaxonomy.taxeditor.prototype1;
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 import eu.etaxonomy.taxeditor.prototype1.model.ObjectList;
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 private ObjectList objectList = new ObjectList();
25
26 /**
27 * The constructor
28 */
29 public Activator() {
30 }
31
32 /*
33 * (non-Javadoc)
34 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
35 */
36 public void start(BundleContext context) throws Exception {
37 super.start(context);
38 plugin = this;
39 }
40
41 /*
42 * (non-Javadoc)
43 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
44 */
45 public void stop(BundleContext context) throws Exception {
46 plugin = null;
47 super.stop(context);
48 }
49
50 /**
51 * Returns the shared instance
52 *
53 * @return the shared instance
54 */
55 public static Activator getDefault() {
56 return plugin;
57 }
58
59 /**
60 * Returns an image descriptor for the image file at the given
61 * plug-in relative path
62 *
63 * @param path the path
64 * @return the image descriptor
65 */
66 public static ImageDescriptor getImageDescriptor(String path) {
67 return imageDescriptorFromPlugin(PLUGIN_ID, path);
68 }
69
70
71 public Image getImage(String key) {
72 return getImageRegistry().get(key);
73 }
74
75 /**
76 * @return the objectList
77 */
78 public CdmApplicationController getApplicationController() {
79 return this.cdmApp;
80 }
81
82
83 /**
84 * @return the objectList
85 */
86 public ObjectList getObjectList() {
87 return this.objectList;
88 }
89 }