Commit | Line | Data |
---|---|---|
4ab33d2b AO |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Francois Chouinard (fchouinard@gmail.com) - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf; | |
14 | ||
15 | import org.eclipse.ui.plugin.AbstractUIPlugin; | |
16 | import org.osgi.framework.BundleContext; | |
17 | ||
18 | /** | |
19 | * <b><u>Activator</u></b> | |
20 | * <p> | |
21 | * The activator class controls the plug-in life cycle | |
22 | */ | |
23 | public class Activator extends AbstractUIPlugin { | |
24 | ||
25 | // ======================================================================== | |
26 | // Attributes | |
27 | // ======================================================================== | |
28 | ||
29 | // The plug-in ID | |
30 | public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf"; | |
31 | ||
32 | // The shared instance | |
33 | private static Activator plugin; | |
34 | ||
35 | // ======================================================================== | |
36 | // Constructors | |
37 | // ======================================================================== | |
38 | ||
39 | /** | |
40 | * The constructor | |
41 | */ | |
42 | public Activator() { | |
43 | } | |
44 | ||
45 | // ======================================================================== | |
46 | // Accessors | |
47 | // ======================================================================== | |
48 | ||
49 | /** | |
50 | * @return the shared instance | |
51 | */ | |
52 | public static Activator getDefault() { | |
53 | return plugin; | |
54 | } | |
55 | ||
56 | // ======================================================================== | |
57 | // Operators | |
58 | // ======================================================================== | |
59 | ||
60 | /* | |
61 | * (non-Javadoc) | |
62 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) | |
63 | */ | |
64 | public void start(BundleContext context) throws Exception { | |
65 | super.start(context); | |
66 | plugin = this; | |
67 | } | |
68 | ||
69 | /* | |
70 | * (non-Javadoc) | |
71 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) | |
72 | */ | |
73 | public void stop(BundleContext context) throws Exception { | |
74 | plugin = null; | |
75 | super.stop(context); | |
76 | } | |
77 | ||
78 | } |