c5daa42e2b2c1d33316e3589ae31f101e3777a49
[public/netxms.git] / src / java / netxms-eclipse / Market / src / org / netxms / ui / eclipse / market / Activator.java
1 /**
2 * NetXMS - open source network management system
3 * Copyright (C) 2003-2016 Victor Kirhenshtein
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */package org.netxms.ui.eclipse.market;
19
20 import org.eclipse.ui.plugin.AbstractUIPlugin;
21 import org.osgi.framework.BundleContext;
22
23 /**
24 * The activator class controls the plug-in life cycle
25 */
26 public class Activator extends AbstractUIPlugin
27 {
28 // The plug-in ID
29 public static final String PLUGIN_ID = "org.netxms.ui.eclipse.market"; //$NON-NLS-1$
30
31 // The shared instance
32 private static Activator plugin;
33
34 /**
35 * The constructor
36 */
37 public Activator()
38 {
39 }
40
41 /*
42 * (non-Javadoc)
43 *
44 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
45 */
46 public void start(BundleContext context) throws Exception
47 {
48 super.start(context);
49 plugin = this;
50 }
51
52 /*
53 * (non-Javadoc)
54 *
55 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
56 */
57 public void stop(BundleContext context) throws Exception
58 {
59 plugin = null;
60 super.stop(context);
61 }
62
63 /**
64 * Returns the shared instance
65 *
66 * @return the shared instance
67 */
68 public static Activator getDefault()
69 {
70 return plugin;
71 }
72 }