1 | package de.uka.ipd.sdq.pcm.gmf.repository.helper; |
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 RepositoryHelperPlugin extends AbstractUIPlugin { |
10 | |
11 | // The plug-in ID |
12 | public static final String PLUGIN_ID = "de.uka.ipd.sdq.pcm.gmf.repository.helper"; |
13 | |
14 | // The shared instance |
15 | private static RepositoryHelperPlugin plugin; |
16 | |
17 | /** |
18 | * Returns the shared instance. |
19 | * |
20 | * @return the plugin instance |
21 | */ |
22 | public static RepositoryHelperPlugin getInstance() { |
23 | return plugin; |
24 | } |
25 | |
26 | /** |
27 | * The constructor |
28 | */ |
29 | public RepositoryHelperPlugin() { |
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 RepositoryHelperPlugin getDefault() { |
56 | return plugin; |
57 | } |
58 | |
59 | } |