1 /*******************************************************************************
2 * Copyright (c) 2011, 2015 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
.tracecompass
.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.tracecompass.ctf.core"; //$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 // ------------------------------------------------------------------------
99 public static void log(String msg
) {
104 * Log a message with an exception
111 public static void log(String msg
, Exception e
) {
112 getDefault().getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, IStatus
.OK
, msg
, e
));
116 * Log an error, with an associated exception
123 public static void logError(String msg
, Exception e
) {
124 getDefault().getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, IStatus
.OK
, msg
, e
));
131 * Desired severity of the message in the log, one of
132 * {@link IStatus#INFO}, {@link IStatus#WARNING} or
133 * {@link IStatus#ERROR}
137 public static void log(int severity
, String msg
) {
138 getDefault().getLog().log(new Status(severity
, PLUGIN_ID
, msg
));
This page took 0.040951 seconds and 5 git commands to generate.