Merge branch 'master' into lttng-kepler
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / 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.core.tests;
14
15 import org.eclipse.core.runtime.Plugin;
16 import org.eclipse.linuxtools.internal.tmf.core.TmfCoreTracer;
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 @SuppressWarnings({ "nls" })
25 public class TmfCoreTestPlugin extends Plugin {
26
27 // ------------------------------------------------------------------------
28 // Attributes
29 // ------------------------------------------------------------------------
30
31 // The plug-in ID
32 @SuppressWarnings("javadoc")
33 public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests";
34
35 // The shared instance
36 private static TmfCoreTestPlugin fPlugin;
37
38 // ------------------------------------------------------------------------
39 // Constructors
40 // ------------------------------------------------------------------------
41
42 /**
43 * The constructor
44 */
45 public TmfCoreTestPlugin() {
46 setDefault(this);
47 }
48
49 // ------------------------------------------------------------------------
50 // Accessors
51 // ------------------------------------------------------------------------
52
53 /**
54 * @return the shared instance
55 */
56 public static TmfCoreTestPlugin getDefault() {
57 return fPlugin;
58 }
59
60 /**
61 * @param plugin the shared instance
62 */
63 private static void setDefault(TmfCoreTestPlugin plugin) {
64 fPlugin = plugin;
65 }
66
67 // ------------------------------------------------------------------------
68 // Operations
69 // ------------------------------------------------------------------------
70
71 @Override
72 public void start(BundleContext context) throws Exception {
73 super.start(context);
74 setDefault(this);
75 TmfCoreTracer.init();
76 }
77
78 @Override
79 public void stop(BundleContext context) throws Exception {
80 TmfCoreTracer.stop();
81 setDefault(null);
82 super.stop(context);
83 }
84
85 }
This page took 0.033553 seconds and 6 git commands to generate.