switch of ValidationDaemon
[taxeditor.git] / eu.etaxonomy.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.ui.plugin.AbstractUIPlugin;
5 import org.osgi.framework.BundleContext;
6
7 import eu.etaxonomy.taxeditor.editor.EditorStateManager;
8 import eu.etaxonomy.taxeditor.editor.UseObjectManager;
9 import eu.etaxonomy.taxeditor.editor.validation.ValidationContextListener;
10 import eu.etaxonomy.taxeditor.store.CdmStore;
11
12 /**
13 * The activator class controls the plug-in life cycle
14 *
15 * @author n.hoffmann
16 * @version $Id: $
17 */
18 public class TaxeditorEditorPlugin extends AbstractUIPlugin {
19
20 /** Constant <code>logger</code> */
21 public static final Logger logger = Logger.getLogger(TaxeditorEditorPlugin.class);
22
23 // The plug-in ID
24 /** Constant <code>PLUGIN_ID="eu.etaxonomy.taxeditor.editor"</code> */
25 public static final String PLUGIN_ID = "eu.etaxonomy.taxeditor.editor";
26
27 // The shared instance
28 private static TaxeditorEditorPlugin plugin;
29
30 /**
31 * The constructor
32 */
33 public TaxeditorEditorPlugin() {
34 }
35
36 /*
37 * (non-Javadoc)
38 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
39 */
40 /** {@inheritDoc} */
41 public void start(BundleContext context) throws Exception {
42 super.start(context);
43
44 EditorStateManager stateManager = new EditorStateManager();
45 CdmStore.getContextManager().addContextListener(stateManager);
46
47 ValidationContextListener vcl = new ValidationContextListener();
48 // CdmStore.getContextManager().addContextListener(vcl);
49
50 plugin = this;
51 logger.trace("Plugin started: " + this.getBundle().getSymbolicName());
52 }
53
54 /*
55 * (non-Javadoc)
56 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
57 */
58 /** {@inheritDoc} */
59 public void stop(BundleContext context) throws Exception {
60 plugin = null;
61 super.stop(context);
62 logger.trace("Plugin stopped");
63 }
64
65 /**
66 * Returns the shared instance
67 *
68 * @return the shared instance
69 */
70 public static TaxeditorEditorPlugin getDefault() {
71 return plugin;
72 }
73 }