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

« back to all changes in this revision

Viewing changes to valgrind/org.eclipse.linuxtools.valgrind.core/src/org/eclipse/linuxtools/internal/valgrind/core/ValgrindPlugin.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) 2008 Red Hat, Inc.
 
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
 *    Elliott Baron <ebaron@redhat.com> - initial API and implementation
 
10
 *******************************************************************************/ 
 
11
package org.eclipse.linuxtools.internal.valgrind.core;
 
12
 
 
13
import org.eclipse.ui.plugin.AbstractUIPlugin;
 
14
import org.osgi.framework.BundleContext;
 
15
 
 
16
public class ValgrindPlugin extends AbstractUIPlugin {
 
17
 
 
18
        // The plug-in ID
 
19
        public static final String PLUGIN_ID = PluginConstants.CORE_PLUGIN_ID;
 
20
 
 
21
        // The shared instance
 
22
        private static ValgrindPlugin plugin;
 
23
        
 
24
        /**
 
25
         * The constructor
 
26
         */
 
27
        public ValgrindPlugin() {
 
28
        }
 
29
 
 
30
        /*
 
31
         * (non-Javadoc)
 
32
         * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
 
33
         */
 
34
        @Override
 
35
        public void start(BundleContext context) throws Exception {
 
36
                super.start(context);
 
37
                plugin = this;
 
38
        }
 
39
 
 
40
        /*
 
41
         * (non-Javadoc)
 
42
         * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
 
43
         */
 
44
        @Override
 
45
        public void stop(BundleContext context) throws Exception {
 
46
                plugin = null;
 
47
                super.stop(context);
 
48
        }
 
49
 
 
50
        /**
 
51
         * Returns the shared instance
 
52
         *
 
53
         * @return the shared instance
 
54
         */
 
55
        public static ValgrindPlugin getDefault() {
 
56
                return plugin;
 
57
        }
 
58
 
 
59
}