~ubuntu-branches/ubuntu/utopic/eclipse-linuxtools/utopic

« back to all changes in this revision

Viewing changes to profiling/org.eclipse.linuxtools.profiling.launch.ui/src/org/eclipse/linuxtools/profiling/launch/ui/Activator.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2014-05-12 18:11:40 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140512181140-w237r3vsah1tmybz
Tags: 2.2.1-1
* New upstream release.
* Refreshed d/patches.
* Removed eclipse-cdt-valgrind-remote package, all its functionality
  is now provided by eclipse-cdt-profiling-framework-remote.
* Added remove-license-feature.patch.
* Bump Standards-Version to 3.9.5.
* Enable eclipse-changelog package.
* Enable eclipse-rpm-editor package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*******************************************************************************
2
 
 * Copyright (c) 2012 IBM Corporation and others.
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 - initial API and implementation
10
 
 ******************************************************************************/
11
 
 
12
 
package org.eclipse.linuxtools.profiling.launch.ui;
13
 
 
14
 
import org.eclipse.core.runtime.IStatus;
15
 
import org.eclipse.core.runtime.Status;
16
 
import org.eclipse.ui.plugin.AbstractUIPlugin;
17
 
import org.osgi.framework.BundleContext;
18
 
 
19
 
/**
20
 
 * The activator class controls the plug-in life cycle
21
 
 */
22
 
public class Activator extends AbstractUIPlugin {
23
 
 
24
 
        // The plug-in ID
25
 
        public static final String PLUGIN_ID = "org.eclipse.linuxtools.profiling.launch.ui"; //$NON-NLS-1$
26
 
 
27
 
        // The shared instance
28
 
        private static Activator plugin;
29
 
        
30
 
        /**
31
 
         * The constructor
32
 
         */
33
 
        public Activator() {
34
 
        }
35
 
 
36
 
        /*
37
 
         * (non-Javadoc)
38
 
         * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
39
 
         */
40
 
        @Override
41
 
        public void start(BundleContext context) throws Exception {
42
 
                super.start(context);
43
 
                plugin = this;
44
 
        }
45
 
 
46
 
        /*
47
 
         * (non-Javadoc)
48
 
         * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
49
 
         */
50
 
        @Override
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 Activator getDefault() {
62
 
                return plugin;
63
 
        }
64
 
 
65
 
        public static void log(int status, String msg, Throwable e) {
66
 
                plugin.getLog().log(new Status(status, PLUGIN_ID, IStatus.OK, msg, e));
67
 
        }
68
 
 
69
 
        public static void log(int status, String msg) {
70
 
                log(status, msg, null);
71
 
        }
72
 
 
73
 
}