Line | |
---|
1 | package org.modelica.mdt.test; |
---|
2 | |
---|
3 | import org.eclipse.core.runtime.Plugin; |
---|
4 | import org.osgi.framework.BundleContext; |
---|
5 | |
---|
6 | /** |
---|
7 | * The main plugin class to be used in the desktop. |
---|
8 | */ |
---|
9 | public class TestPlugin extends Plugin { |
---|
10 | |
---|
11 | //The shared instance. |
---|
12 | private static TestPlugin plugin; |
---|
13 | |
---|
14 | /** |
---|
15 | * The constructor. |
---|
16 | */ |
---|
17 | public TestPlugin() { |
---|
18 | plugin = this; |
---|
19 | } |
---|
20 | |
---|
21 | /** |
---|
22 | * This method is called upon plug-in activation |
---|
23 | */ |
---|
24 | public void start(BundleContext context) throws Exception { |
---|
25 | super.start(context); |
---|
26 | } |
---|
27 | |
---|
28 | /** |
---|
29 | * This method is called when the plug-in is stopped |
---|
30 | */ |
---|
31 | public void stop(BundleContext context) throws Exception { |
---|
32 | super.stop(context); |
---|
33 | plugin = null; |
---|
34 | } |
---|
35 | |
---|
36 | /** |
---|
37 | * Returns the shared instance. |
---|
38 | */ |
---|
39 | public static TestPlugin getDefault() { |
---|
40 | return plugin; |
---|
41 | } |
---|
42 | |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.