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

« back to all changes in this revision

Viewing changes to gcov/org.eclipse.linuxtools.gcov.core/src/org/eclipse/linuxtools/gcov/Activator.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) 2009 STMicroelectronics.
 
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
 *    Xavier Raynaud <xavier.raynaud@st.com> - initial API and implementation
 
10
 *******************************************************************************/
 
11
package org.eclipse.linuxtools.gcov;
 
12
 
 
13
import org.eclipse.jface.resource.ImageDescriptor;
 
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
public class Activator extends AbstractUIPlugin {
 
21
 
 
22
        // The plug-in ID
 
23
        public static final String PLUGIN_ID = "org.eclipse.linuxtools.gcov.core";
 
24
 
 
25
        // The shared instance
 
26
        private static Activator plugin;
 
27
        
 
28
        /**
 
29
         * The constructor
 
30
         */
 
31
        public Activator() {
 
32
        }
 
33
 
 
34
        /*
 
35
         * (non-Javadoc)
 
36
         * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
 
37
         */
 
38
        public void start(BundleContext context) throws Exception {
 
39
                super.start(context);
 
40
                plugin = this;
 
41
        }
 
42
 
 
43
        /*
 
44
         * (non-Javadoc)
 
45
         * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
 
46
         */
 
47
        public void stop(BundleContext context) throws Exception {
 
48
                plugin = null;
 
49
                super.stop(context);
 
50
        }
 
51
 
 
52
        /**
 
53
         * Returns the shared instance
 
54
         *
 
55
         * @return the shared instance
 
56
         */
 
57
        public static Activator getDefault() {
 
58
                return plugin;
 
59
        }
 
60
 
 
61
        /**
 
62
         * Returns an image descriptor for the image file at the given
 
63
         * plug-in relative path
 
64
         *
 
65
         * @param path the path
 
66
         * @return the image descriptor
 
67
         */
 
68
        public static ImageDescriptor getImageDescriptor(String path) {
 
69
                return imageDescriptorFromPlugin(PLUGIN_ID, path);
 
70
        }
 
71
}