2010-06-21 fchouinard@gmail.com Fix for Bug316276
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.tests / src / org / eclipse / linuxtools / tmf / tests / TmfCoreTestPlugin.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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.tests;
14
15 import org.eclipse.core.runtime.Plugin;
16 import org.eclipse.linuxtools.tmf.Tracer;
17 import org.osgi.framework.BundleContext;
18
19 /**
20 * <b><u>TmfTestPlugin</u></b>
21 * <p>
22 * The activator class controls the plug-in life cycle
23 */
24 public class TmfCoreTestPlugin extends Plugin {
25
26 // ------------------------------------------------------------------------
27 // Attributes
28 // ------------------------------------------------------------------------
29
30 // The plug-in ID
31 public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests";
32
33 // The shared instance
34 private static TmfCoreTestPlugin fPlugin;
35
36 // ------------------------------------------------------------------------
37 // Constructors
38 // ------------------------------------------------------------------------
39
40 /**
41 * The constructor
42 */
43 public TmfCoreTestPlugin() {
44 setDefault(this);
45 }
46
47 // ------------------------------------------------------------------------
48 // Accessors
49 // ------------------------------------------------------------------------
50
51 /**
52 * @return the shared instance
53 */
54 public static TmfCoreTestPlugin getDefault() {
55 return fPlugin;
56 }
57
58 /**
59 * @param plugin the shared instance
60 */
61 private static void setDefault(TmfCoreTestPlugin plugin) {
62 fPlugin = plugin;
63 }
64
65 // ------------------------------------------------------------------------
66 // Operations
67 // ------------------------------------------------------------------------
68
69 @Override
70 public void start(BundleContext context) throws Exception {
71 super.start(context);
72 setDefault(this);
73 Tracer.init();
74 }
75
76 @Override
77 public void stop(BundleContext context) throws Exception {
78 Tracer.stop();
79 setDefault(null);
80 super.stop(context);
81 }
82
83 }
This page took 0.034334 seconds and 5 git commands to generate.