Commit | Line | Data |
---|---|---|
6de2f761 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2011, 2014 Ericsson |
6de2f761 PT |
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 | * Patrick Tasse - Updated for TMF 2.0 | |
12 | *******************************************************************************/ | |
13 | ||
04c0d7d3 | 14 | package org.eclipse.tracecompass.internal.gdbtrace.core; |
6de2f761 PT |
15 | |
16 | import org.eclipse.core.runtime.Plugin; | |
17 | import org.osgi.framework.BundleContext; | |
18 | ||
19 | /** | |
20 | * GDB Tracepoint Analysis Core plug-in activator | |
21 | * @author Francois Chouinard | |
22 | */ | |
23 | public class GdbTraceCorePlugin extends Plugin { | |
24 | ||
25 | // ------------------------------------------------------------------------ | |
26 | // Attributes | |
27 | // ------------------------------------------------------------------------ | |
28 | ||
29 | /** The plug-in ID */ | |
8343b1f5 | 30 | public static final String PLUGIN_ID = "org.eclipse.linuxtools.gdbtrace.core"; //$NON-NLS-1$ |
6de2f761 PT |
31 | |
32 | private static GdbTraceCorePlugin plugin; | |
33 | ||
34 | private static BundleContext fBundleContext; | |
35 | ||
36 | // ------------------------------------------------------------------------ | |
37 | // Constructor | |
38 | // ------------------------------------------------------------------------ | |
39 | ||
40 | /** | |
41 | * Constructor | |
42 | */ | |
43 | public GdbTraceCorePlugin() { | |
44 | } | |
45 | ||
46 | // ------------------------------------------------------------------------ | |
47 | // Plugin | |
48 | // ------------------------------------------------------------------------ | |
49 | ||
50 | @Override | |
51 | public void start(BundleContext context) throws Exception { | |
52 | super.start(context); | |
53 | plugin = this; | |
54 | fBundleContext = context; | |
55 | } | |
56 | ||
57 | @Override | |
58 | public void stop(BundleContext context) throws Exception { | |
59 | plugin = null; | |
60 | super.stop(context); | |
61 | } | |
62 | ||
63 | // ------------------------------------------------------------------------ | |
64 | // Accessor | |
65 | // ------------------------------------------------------------------------ | |
66 | ||
67 | /** | |
68 | * Returns the GDB Tracepoints Core plug-in instance. | |
69 | * | |
70 | * @return the GDB Tracepoints Core plug-in instance | |
71 | */ | |
72 | public static GdbTraceCorePlugin getDefault() { | |
73 | return plugin; | |
74 | } | |
75 | ||
76 | /** | |
77 | * Returns the bundle context | |
78 | * | |
79 | * @return the bundle context | |
80 | */ | |
81 | public static BundleContext getBundleContext() { | |
82 | return fBundleContext; | |
83 | } | |
84 | ||
85 | } |