Commit | Line | Data |
---|---|---|
032ecd45 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2013, 2014 Ericsson |
032ecd45 MAL |
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 | * Marc-Andre Laperle - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.ui.tests; |
032ecd45 MAL |
14 | |
15 | import org.eclipse.core.runtime.Plugin; | |
16 | import org.osgi.framework.BundleContext; | |
17 | ||
18 | /** | |
19 | * <b><u>TmfUITestPlugin</u></b> | |
20 | * <p> | |
21 | * The activator class controls the plug-in life cycle | |
22 | * | |
23 | * @author Marc-Andre Laperle | |
24 | */ | |
25 | public class TmfUITestPlugin extends Plugin { | |
26 | ||
27 | // ------------------------------------------------------------------------ | |
28 | // Attributes | |
29 | // ------------------------------------------------------------------------ | |
30 | ||
31 | /** | |
32 | * The plug-in ID | |
33 | */ | |
c77a695a | 34 | public static final String PLUGIN_ID = "org.eclipse.tracecompass.tmf.ui.tests"; |
032ecd45 MAL |
35 | |
36 | // The shared instance | |
37 | private static TmfUITestPlugin fPlugin; | |
38 | ||
39 | // ------------------------------------------------------------------------ | |
40 | // Constructors | |
41 | // ------------------------------------------------------------------------ | |
42 | ||
43 | /** | |
44 | * The constructor | |
45 | */ | |
46 | public TmfUITestPlugin() { | |
47 | setDefault(this); | |
48 | } | |
49 | ||
50 | // ------------------------------------------------------------------------ | |
51 | // Accessors | |
52 | // ------------------------------------------------------------------------ | |
53 | ||
54 | /** | |
55 | * @return the shared instance | |
56 | */ | |
57 | public static TmfUITestPlugin getDefault() { | |
58 | return fPlugin; | |
59 | } | |
60 | ||
61 | /** | |
62 | * @param plugin the shared instance | |
63 | */ | |
64 | private static void setDefault(TmfUITestPlugin plugin) { | |
65 | fPlugin = plugin; | |
66 | } | |
67 | ||
68 | // ------------------------------------------------------------------------ | |
69 | // Operations | |
70 | // ------------------------------------------------------------------------ | |
71 | ||
72 | @Override | |
73 | public void start(BundleContext context) throws Exception { | |
74 | super.start(context); | |
75 | setDefault(this); | |
76 | } | |
77 | ||
78 | @Override | |
79 | public void stop(BundleContext context) throws Exception { | |
80 | setDefault(null); | |
81 | super.stop(context); | |
82 | } | |
83 | ||
84 | } |