4d6ec364fbd1f74f8ca8f547e5b2e07f80cde315
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core.tests / src / org / eclipse / linuxtools / tmf / core / tests / TmfCoreTestPlugin.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2013 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 public class TmfCoreTestPlugin extends Plugin {
25
26 // ------------------------------------------------------------------------
27 // Attributes
28 // ------------------------------------------------------------------------
29
30 // The plug-in ID
31 @SuppressWarnings("javadoc")
32 public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.tests";
33
34 // The shared instance
35 private static TmfCoreTestPlugin fPlugin;
36
37 // ------------------------------------------------------------------------
38 // Constructors
39 // ------------------------------------------------------------------------
40
41 /**
42 * The constructor
43 */
44 public TmfCoreTestPlugin() {
45 setDefault(this);
46 }
47
48 // ------------------------------------------------------------------------
49 // Accessors
50 // ------------------------------------------------------------------------
51
52 /**
53 * @return the shared instance
54 */
55 public static TmfCoreTestPlugin getDefault() {
56 return fPlugin;
57 }
58
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);
74 TmfCoreTracer.init();
75 }
76
77 @Override
78 public void stop(BundleContext context) throws Exception {
79 TmfCoreTracer.stop();
80 setDefault(null);
81 super.stop(context);
82 }
83
84 }
This page took 0.035432 seconds and 4 git commands to generate.