Rename xxx.lttng to xxx.lttng.core
[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 */
3b38ea61 24@SuppressWarnings("nls")
d18dd09b
ASL
25public class TmfCoreTestPlugin extends Plugin {
26
cbd4ad82 27 // ------------------------------------------------------------------------
d18dd09b 28 // Attributes
cbd4ad82 29 // ------------------------------------------------------------------------
d18dd09b
ASL
30
31 // The plug-in ID
32 public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests";
33
34 // The shared instance
cbd4ad82 35 private static TmfCoreTestPlugin fPlugin;
d18dd09b 36
cbd4ad82 37 // ------------------------------------------------------------------------
d18dd09b 38 // Constructors
cbd4ad82 39 // ------------------------------------------------------------------------
d18dd09b
ASL
40
41 /**
42 * The constructor
43 */
44 public TmfCoreTestPlugin() {
cbd4ad82 45 setDefault(this);
d18dd09b
ASL
46 }
47
cbd4ad82 48 // ------------------------------------------------------------------------
d18dd09b 49 // Accessors
cbd4ad82 50 // ------------------------------------------------------------------------
d18dd09b
ASL
51
52 /**
53 * @return the shared instance
54 */
cbd4ad82
FC
55 public static TmfCoreTestPlugin getDefault() {
56 return fPlugin;
d18dd09b
ASL
57 }
58
cbd4ad82
FC
59 /**
60 * @param plugin the shared instance
61 */
62 private static void setDefault(TmfCoreTestPlugin plugin) {
63 fPlugin = plugin;
64 }
65
66 // ------------------------------------------------------------------------
67 // Operations
68 // ------------------------------------------------------------------------
69
70 @Override
71 public void start(BundleContext context) throws Exception {
72 super.start(context);
73 setDefault(this);
9b635e61 74 Tracer.init();
cbd4ad82
FC
75 }
76
77 @Override
78 public void stop(BundleContext context) throws Exception {
9b635e61 79 Tracer.stop();
cbd4ad82
FC
80 setDefault(null);
81 super.stop(context);
82 }
83
d18dd09b 84}
This page took 0.036143 seconds and 5 git commands to generate.