~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboardextension/DashboardExtensionPlugin.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2012-06-29 12:07:30 UTC
  • Revision ID: package-import@ubuntu.com-20120629120730-bfri1xys1i71dpn6
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*******************************************************************************
 
2
 * Copyright (c) 2006 IBM Corporation.
 
3
 * All rights reserved. This program and the accompanying materials
 
4
 * are made available under the terms of the Eclipse Public License v1.0
 
5
 * which accompanies this distribution, and is available at
 
6
 * http://www.eclipse.org/legal/epl-v10.html
 
7
 *
 
8
 * Contributors:
 
9
 *     IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse, Anithra P J
 
10
 *******************************************************************************/
 
11
 
 
12
package org.eclipse.linuxtools.internal.systemtap.ui.dashboardextension;
 
13
 
 
14
import org.eclipse.ui.IStartup;
 
15
import org.eclipse.ui.plugin.*;
 
16
import org.eclipse.jface.resource.ImageDescriptor;
 
17
import org.osgi.framework.BundleContext;
 
18
 
 
19
/**
 
20
 * The main plugin class to be used in the desktop.
 
21
 */
 
22
public class DashboardExtensionPlugin extends AbstractUIPlugin implements IStartup {
 
23
 
 
24
        //The shared instance.
 
25
        private static DashboardExtensionPlugin plugin;
 
26
        
 
27
        /**
 
28
         * The constructor.
 
29
         */
 
30
        public DashboardExtensionPlugin() {
 
31
                plugin = this;
 
32
        }
 
33
 
 
34
        /**
 
35
         * This method is called upon plug-in activation
 
36
         */
 
37
        public void start(BundleContext context) throws Exception {
 
38
                super.start(context);
 
39
        }
 
40
 
 
41
        /**
 
42
         * This method is called when the plug-in is stopped
 
43
         */
 
44
        public void stop(BundleContext context) throws Exception {
 
45
                super.stop(context);
 
46
                plugin = null;
 
47
        }
 
48
 
 
49
        /**
 
50
         * Returns the shared instance.
 
51
         */
 
52
        public static DashboardExtensionPlugin getDefault() {
 
53
                return plugin;
 
54
        }
 
55
 
 
56
        /**
 
57
         * Returns an image descriptor for the image file at the given
 
58
         * plug-in relative path.
 
59
         *
 
60
         * @param path the path
 
61
         * @return the image descriptor
 
62
         */
 
63
        public static ImageDescriptor getImageDescriptor(String path) {
 
64
                return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.dashboardextension", path);
 
65
        }
 
66
        
 
67
        public void earlyStartup() {}
 
68
}