Moving editor sources back into trunk
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / editor / internal / TaxeditorEditorPlugin.java
1 package eu.etaxonomy.taxeditor.editor.internal;
2
3 import org.apache.log4j.Logger;
4 import org.eclipse.jface.resource.ImageDescriptor;
5 import org.eclipse.jface.resource.ImageRegistry;
6 import org.eclipse.ui.plugin.AbstractUIPlugin;
7 import org.osgi.framework.BundleContext;
8
9 /**
10 * The activator class controls the plug-in life cycle
11 */
12 public class TaxeditorEditorPlugin extends AbstractUIPlugin {
13
14 public static final Logger logger = Logger.getLogger(TaxeditorEditorPlugin.class);
15
16 // The plug-in ID
17 public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor";
18
19 // The shared instance
20 private static TaxeditorEditorPlugin plugin;
21
22 /**
23 * The constructor
24 */
25 public TaxeditorEditorPlugin() {
26 }
27
28 /*
29 * (non-Javadoc)
30 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
31 */
32 public void start(BundleContext context) throws Exception {
33 super.start(context);
34 plugin = this;
35 logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
36 }
37
38 /*
39 * (non-Javadoc)
40 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
41 */
42 public void stop(BundleContext context) throws Exception {
43 plugin = null;
44 super.stop(context);
45 logger.trace("Plugin stopped");
46 }
47
48 /**
49 * Returns the shared instance
50 *
51 * @return the shared instance
52 */
53 public static TaxeditorEditorPlugin getDefault() {
54 return plugin;
55 }
56 }