March 24, 2010
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui.tests / src / org / eclipse / linuxtools / tmf / ui / tests / TmfUITestPlugin.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.linuxtools.tmf.ui.tests;
13
14 import org.eclipse.jface.resource.ImageDescriptor;
15 import org.eclipse.ui.plugin.AbstractUIPlugin;
16 import org.osgi.framework.BundleContext;
17
18 /**
19 * The activator class controls the plug-in life cycle
20 */
21 public class TmfUITestPlugin extends AbstractUIPlugin {
22
23 // The plug-in ID
24 public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.ui.tests";
25
26 // The shared instance
27 private static TmfUITestPlugin plugin;
28
29 // ========================================================================
30 // Constructor
31 // ========================================================================
32 public TmfUITestPlugin() {
33 }
34
35 // ========================================================================
36 // Methods
37 // ========================================================================
38 /*
39 * (non-Javadoc)
40 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
41 */
42 public void start(BundleContext context) throws Exception {
43 super.start(context);
44 plugin = this;
45 }
46
47 /*
48 * (non-Javadoc)
49 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
50 */
51 public void stop(BundleContext context) throws Exception {
52 plugin = null;
53 super.stop(context);
54 }
55
56 /**
57 * Returns the shared instance
58 *
59 * @return the shared instance
60 */
61 public static TmfUITestPlugin getDefault() {
62 return plugin;
63 }
64
65 /**
66 * Returns an image descriptor for the image file at the given
67 * plug-in relative path
68 *
69 * @param path the path
70 * @return the image descriptor
71 */
72 public static ImageDescriptor getImageDescriptor(String path) {
73 return imageDescriptorFromPlugin(PLUGIN_ID, path);
74 }
75 }
This page took 0.032463 seconds and 5 git commands to generate.