56c9acbfb865f0493c7ac9121aeb646fed74eb8f
1 /*******************************************************************************
2 * Copyright (c) 2011, 2013 Ericsson, Ecole Polytechnique de Montreal and others
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.ctf
.core
;
15 import org
.eclipse
.core
.runtime
.IStatus
;
16 import org
.eclipse
.core
.runtime
.Plugin
;
17 import org
.eclipse
.core
.runtime
.Status
;
18 import org
.osgi
.framework
.BundleContext
;
21 * <b><u>Activator</u></b>
23 * The activator class controls the plug-in life cycle.
25 public class Activator
extends Plugin
{
27 // ------------------------------------------------------------------------
29 // ------------------------------------------------------------------------
34 public static final String PLUGIN_ID
= "org.eclipse.linuxtools.ctf"; //$NON-NLS-1$
39 private static Activator fPlugin
;
41 // ------------------------------------------------------------------------
43 // ------------------------------------------------------------------------
52 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
57 * Get the default activator
58 * @return the default activator
60 public static Activator
getDefault() {
65 * Sets the default activator
67 * @param plugin the default activator
69 private static void setDefault(Activator plugin
) {
73 // ------------------------------------------------------------------------
75 // ------------------------------------------------------------------------
78 public void start(BundleContext context
) throws Exception
{
84 public void stop(BundleContext context
) throws Exception
{
89 // ------------------------------------------------------------------------
91 // ------------------------------------------------------------------------
95 * @param msg the message to log
97 public static void log(String msg
) {
102 * Log a message with an exception
103 * @param msg the message
104 * @param e the exception
106 public static void log(String msg
, Exception e
) {
107 getDefault().getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, IStatus
.OK
, msg
, e
));
112 * @param severity desired severity of the message in the log,
113 * one of {@link IStatus#INFO}, {@link IStatus#WARNING} or {@link IStatus#ERROR}
114 * @param msg the message to log
116 public static void log(int severity
, String msg
) {
117 getDefault().getLog().log(new Status(severity
, PLUGIN_ID
, msg
));
This page took 0.032685 seconds and 5 git commands to generate.