Contribute CNF based TMF project handling
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf / src / org / eclipse / linuxtools / tmf / TmfCorePlugin.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010, 2011 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;
14
15 import org.eclipse.core.runtime.Plugin;
16 import org.osgi.framework.BundleContext;
17
18 /**
19 * <b><u>TmfCorePlugin</u></b>
20 * <p>
21 * The activator class controls the plug-in life cycle. No more than one such
22 * plug-in can exist at any time.
23 */
24 public class TmfCorePlugin extends Plugin {
25
26 // ------------------------------------------------------------------------
27 // Attributes
28 // ------------------------------------------------------------------------
29
30 // The plug-in ID
31 public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf"; //$NON-NLS-1$
32 public static final String TMF_TRACE_TYPE_ID = "org.eclipse.linuxtools.tmf.tracetype"; //$NON-NLS-1$
33
34 // The shared instance
35 private static TmfCorePlugin fPlugin;
36
37 // ------------------------------------------------------------------------
38 // Constructors
39 // ------------------------------------------------------------------------
40
41 public TmfCorePlugin() {
42 setDefault(this);
43 }
44
45 // ------------------------------------------------------------------------
46 // Accessors
47 // ------------------------------------------------------------------------
48
49 public static TmfCorePlugin getDefault() {
50 return fPlugin;
51 }
52
53 private static void setDefault(TmfCorePlugin plugin) {
54 fPlugin = plugin;
55 }
56
57 // ------------------------------------------------------------------------
58 // Plugin
59 // ------------------------------------------------------------------------
60
61 @Override
62 public void start(BundleContext context) throws Exception {
63 super.start(context);
64 setDefault(this);
65 Tracer.init();
66 }
67
68 @Override
69 public void stop(BundleContext context) throws Exception {
70 Tracer.stop();
71 setDefault(null);
72 super.stop(context);
73 }
74
75 }
This page took 0.032797 seconds and 5 git commands to generate.