Commit | Line | Data |
---|---|---|
5d10d135 ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009 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.lttng; | |
14 | ||
15 | import org.eclipse.core.runtime.Plugin; | |
16 | import org.osgi.framework.BundleContext; | |
17 | ||
18 | /** | |
19 | * <b><u>LTTngCorePlugin</u></b> | |
20 | * <p> | |
21 | * The activator class controls the plug-in life cycle | |
22 | */ | |
23 | public class LTTngCorePlugin extends Plugin { | |
24 | ||
25 | // ======================================================================== | |
26 | // Attributes | |
27 | // ======================================================================== | |
28 | ||
29 | // The plug-in ID | |
9c4eb5f7 | 30 | public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng"; //$NON-NLS-1$ |
5d10d135 ASL |
31 | |
32 | // The shared instance | |
33 | private static LTTngCorePlugin plugin; | |
34 | ||
35 | // ======================================================================== | |
36 | // Constructors | |
37 | // ======================================================================== | |
38 | ||
39 | /** | |
40 | * The constructor | |
41 | */ | |
42 | public LTTngCorePlugin() { | |
43 | } | |
44 | ||
45 | // ======================================================================== | |
46 | // Accessors | |
47 | // ======================================================================== | |
48 | ||
49 | /** | |
50 | * Returns the shared instance | |
51 | * | |
52 | * @return the shared instance | |
53 | */ | |
54 | public static LTTngCorePlugin getDefault() { | |
55 | return plugin; | |
56 | } | |
57 | ||
58 | // ======================================================================== | |
59 | // Operators | |
60 | // ======================================================================== | |
61 | ||
62 | /* | |
63 | * (non-Javadoc) | |
64 | * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext) | |
65 | */ | |
66 | @Override | |
67 | public void start(BundleContext context) throws Exception { | |
68 | super.start(context); | |
69 | plugin = this; | |
8827c197 | 70 | LttngFactory.init(); |
5d10d135 ASL |
71 | } |
72 | ||
73 | /* | |
74 | * (non-Javadoc) | |
75 | * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) | |
76 | */ | |
77 | @Override | |
78 | public void stop(BundleContext context) throws Exception { | |
79 | plugin = null; | |
80 | super.stop(context); | |
81 | } | |
82 | ||
83 | } |