| 1 | package de.uka.ipd.sdq.cip; |
| 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 | * @author Thomas Schuischel |
| 10 | */ |
| 11 | public class CipPlugin extends AbstractUIPlugin { |
| 12 | |
| 13 | // The plug-in ID |
| 14 | public static final String PLUGIN_ID = "de.uka.ipd.sdq.cip"; |
| 15 | |
| 16 | // The shared instance |
| 17 | private static CipPlugin plugin; |
| 18 | |
| 19 | /** |
| 20 | * The constructor |
| 21 | */ |
| 22 | public CipPlugin() { |
| 23 | } |
| 24 | |
| 25 | /* |
| 26 | * (non-Javadoc) |
| 27 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) |
| 28 | */ |
| 29 | public void start(BundleContext context) throws Exception { |
| 30 | super.start(context); |
| 31 | plugin = this; |
| 32 | } |
| 33 | |
| 34 | /* |
| 35 | * (non-Javadoc) |
| 36 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) |
| 37 | */ |
| 38 | public void stop(BundleContext context) throws Exception { |
| 39 | plugin = null; |
| 40 | super.stop(context); |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Returns the shared instance |
| 45 | * |
| 46 | * @return the shared instance |
| 47 | */ |
| 48 | public static CipPlugin getDefault() { |
| 49 | return plugin; |
| 50 | } |
| 51 | |
| 52 | } |