Commit | Line | Data |
---|---|---|
d9ac72f4 BH |
1 | /******************************************************************************* |
2 | * Copyright (c) 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 | * Bernd Hufmann - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | package org.eclipse.linuxtools.tracing.examples.ui; | |
13 | ||
14 | import org.eclipse.ui.plugin.AbstractUIPlugin; | |
15 | import org.osgi.framework.BundleContext; | |
16 | ||
17 | /** | |
18 | * The activator class controls the plug-in life cycle. | |
19 | * | |
20 | * @author Bernd Hufmann | |
21 | */ | |
22 | public class Activator extends AbstractUIPlugin { | |
23 | ||
24 | /** The plug-in ID */ | |
25 | public static final String PLUGIN_ID = "org.eclipse.linuxtools.tracing.examples"; //$NON-NLS-1$ | |
26 | ||
27 | // The shared instance | |
28 | private static Activator fPlugin; | |
29 | ||
30 | /** | |
31 | * The constructor | |
32 | */ | |
33 | public Activator() { | |
34 | } | |
35 | ||
36 | @Override | |
37 | public void start(BundleContext context) throws Exception { | |
38 | super.start(context); | |
39 | fPlugin = this; | |
40 | } | |
41 | ||
42 | @Override | |
43 | public void stop(BundleContext context) throws Exception { | |
44 | fPlugin = null; | |
45 | super.stop(context); | |
46 | } | |
47 | ||
48 | /** | |
49 | * Returns the shared instance | |
50 | * | |
51 | * @return the shared instance | |
52 | */ | |
53 | public static Activator getDefault() { | |
54 | return fPlugin; | |
55 | } | |
56 | ||
57 | } |