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

« back to all changes in this revision

Viewing changes to systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/GraphingPlugin.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
 
10
 *******************************************************************************/
 
11
 
 
12
package org.eclipse.linuxtools.internal.systemtap.ui.graphing;
 
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 main plugin class to be used in the desktop.
 
20
 */
 
21
public class GraphingPlugin extends AbstractUIPlugin {
 
22
 
 
23
        //The shared instance.
 
24
        private static GraphingPlugin plugin;
 
25
        
 
26
        /**
 
27
         * The constructor.
 
28
         */
 
29
        public GraphingPlugin() {
 
30
                plugin = this;
 
31
        }
 
32
 
 
33
        /**
 
34
         * This method is called upon plug-in activation
 
35
         */
 
36
        public void start(BundleContext context) throws Exception {
 
37
                super.start(context);
 
38
        }
 
39
 
 
40
        /**
 
41
         * This method is called when the plug-in is stopped
 
42
         */
 
43
        public void stop(BundleContext context) throws Exception {
 
44
                super.stop(context);
 
45
                plugin = null;
 
46
        }
 
47
 
 
48
        /**
 
49
         * Returns the shared instance.
 
50
         */
 
51
        public static GraphingPlugin getDefault() {
 
52
                return plugin;
 
53
        }
 
54
 
 
55
        /**
 
56
         * Returns an image descriptor for the image file at the given
 
57
         * plug-in relative path.
 
58
         *
 
59
         * @param path the path
 
60
         * @return the image descriptor
 
61
         */
 
62
        public static ImageDescriptor getImageDescriptor(String path) {
 
63
                return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.linuxtools.systemtap.ui.graphing", path);
 
64
        }
 
65
}