Commit | Line | Data |
---|---|---|
b0d3496e ASL |
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 - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.ui; | |
14 | ||
15 | import org.eclipse.ui.plugin.AbstractUIPlugin; | |
16 | import org.osgi.framework.BundleContext; | |
17 | ||
18 | /** | |
19 | * <b><u>TmfUiPlugin</u></b> | |
20 | * <p> | |
21 | * The activator class controls the plug-in life cycle | |
22 | */ | |
23 | public class TmfUiPlugin extends AbstractUIPlugin { | |
24 | ||
25 | // ======================================================================== | |
26 | // Attributes | |
27 | // ======================================================================== | |
28 | ||
29 | // The plug-in ID | |
30 | public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.ui"; | |
31 | ||
32 | // The shared instance | |
33 | private static TmfUiPlugin plugin; | |
34 | ||
35 | // ======================================================================== | |
36 | // Constructors | |
37 | // ======================================================================== | |
38 | ||
39 | /** | |
40 | * The constructor | |
41 | */ | |
42 | public TmfUiPlugin() { | |
43 | } | |
44 | ||
45 | // ======================================================================== | |
46 | // Accessors | |
47 | // ======================================================================== | |
48 | ||
49 | /** | |
50 | * Returns the shared instance | |
51 | * | |
52 | * @return the shared instance | |
53 | */ | |
54 | public static TmfUiPlugin getDefault() { | |
55 | return plugin; | |
56 | } | |
57 | ||
58 | // ======================================================================== | |
59 | // Operators | |
60 | // ======================================================================== | |
61 | ||
62 | /* | |
63 | * (non-Javadoc) | |
64 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) | |
65 | */ | |
62d1696a | 66 | @Override |
b0d3496e ASL |
67 | public void start(BundleContext context) throws Exception { |
68 | super.start(context); | |
69 | plugin = this; | |
70 | } | |
71 | ||
72 | /* | |
73 | * (non-Javadoc) | |
74 | * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) | |
75 | */ | |
62d1696a | 76 | @Override |
b0d3496e ASL |
77 | public void stop(BundleContext context) throws Exception { |
78 | plugin = null; | |
79 | super.stop(context); | |
80 | } | |
81 | ||
82 | } |