]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.editors.win32/src/org/simantics/editors/win32/Activator.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.editors.win32 / src / org / simantics / editors / win32 / Activator.java
1 /*******************************************************************************\r
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
3  * in Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.editors.win32;\r
13 \r
14 import org.eclipse.ui.plugin.AbstractUIPlugin;\r
15 import org.osgi.framework.BundleContext;\r
16 \r
17 \r
18 public class Activator extends AbstractUIPlugin {\r
19         // The plug-in ID\r
20         public static final String PLUGIN_ID = "org.simantics.editors.win32";\r
21 \r
22         // The shared instance\r
23         private static Activator plugin;\r
24         \r
25         /**\r
26          * The constructor\r
27          */\r
28         public Activator() {\r
29         }\r
30 \r
31         /*\r
32          * (non-Javadoc)\r
33          * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)\r
34          */\r
35         public void start(BundleContext context) throws Exception {\r
36                 super.start(context);\r
37                 plugin = this;\r
38         }\r
39 \r
40         /*\r
41          * (non-Javadoc)\r
42          * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)\r
43          */\r
44         public void stop(BundleContext context) throws Exception {\r
45                 plugin = null;\r
46                 super.stop(context);\r
47         }\r
48 \r
49         /**\r
50          * Returns the shared instance\r
51          *\r
52          * @return the shared instance\r
53          */\r
54         public static Activator getDefault() {\r
55                 return plugin;\r
56         }\r
57 }\r