]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.workbench.search.impl/src/org/simantics/workbench/search/impl/Activator.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.workbench.search.impl / src / org / simantics / workbench / search / impl / Activator.java
1 package org.simantics.workbench.search.impl;
2
3 import org.eclipse.ui.plugin.AbstractUIPlugin;
4 import org.osgi.framework.BundleContext;
5
6 /**
7  * The activator class controls the plug-in life cycle
8  */
9 public class Activator extends AbstractUIPlugin {
10
11         // The plug-in ID
12         public static final String PLUGIN_ID = "org.simantics.workbench.search.impl"; //$NON-NLS-1$
13
14         // The shared instance
15         private static Activator plugin;
16         
17         /**
18          * The constructor
19          */
20         public Activator() {
21         }
22
23         @Override
24         public void start(BundleContext context) throws Exception {
25                 super.start(context);
26                 plugin = this;
27         }
28
29         @Override
30         public void stop(BundleContext context) throws Exception {
31                 plugin = null;
32                 super.stop(context);
33         }
34
35         /**
36          * Returns the shared instance
37          *
38          * @return the shared instance
39          */
40         public static Activator getDefault() {
41                 return plugin;
42         }
43
44 }