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
CommitLineData
d18dd09b 1/*******************************************************************************
cbd4ad82 2 * Copyright (c) 2009, 2010 Ericsson
d18dd09b
ASL
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
13package org.eclipse.linuxtools.tmf.tests;
14
15import org.eclipse.core.runtime.Plugin;
9b635e61 16import org.eclipse.linuxtools.tmf.Tracer;
cbd4ad82 17import org.osgi.framework.BundleContext;
d18dd09b
ASL
18
19/**
20 * <b><u>TmfTestPlugin</u></b>
21 * <p>
22 * The activator class controls the plug-in life cycle
23 */
24public class TmfCoreTestPlugin extends Plugin {
25
cbd4ad82 26 // ------------------------------------------------------------------------
d18dd09b 27 // Attributes
cbd4ad82 28 // ------------------------------------------------------------------------
d18dd09b
ASL
29
30 // The plug-in ID
31 public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests";
32
33 // The shared instance
cbd4ad82 34 private static TmfCoreTestPlugin fPlugin;
d18dd09b 35
cbd4ad82 36 // ------------------------------------------------------------------------
d18dd09b 37 // Constructors
cbd4ad82 38 // ------------------------------------------------------------------------
d18dd09b
ASL
39
40 /**
41 * The constructor
42 */
43 public TmfCoreTestPlugin() {
cbd4ad82 44 setDefault(this);
d18dd09b
ASL
45 }
46
cbd4ad82 47 // ------------------------------------------------------------------------
d18dd09b 48 // Accessors
cbd4ad82 49 // ------------------------------------------------------------------------
d18dd09b
ASL
50
51 /**
52 * @return the shared instance
53 */
cbd4ad82
FC
54 public static TmfCoreTestPlugin getDefault() {
55 return fPlugin;
d18dd09b
ASL
56 }
57
cbd4ad82
FC
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);
9b635e61 73 Tracer.init();
cbd4ad82
FC
74 }
75
76 @Override
77 public void stop(BundleContext context) throws Exception {
9b635e61 78 Tracer.stop();
cbd4ad82
FC
79 setDefault(null);
80 super.stop(context);
81 }
82
d18dd09b 83}
This page took 0.029676 seconds and 5 git commands to generate.