1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson
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
.lttng2
.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.lttng2.core"; //$NON-NLS-1$
39 private static Activator plugin
;
41 // ------------------------------------------------------------------------
43 // ------------------------------------------------------------------------
51 // ------------------------------------------------------------------------
53 // ------------------------------------------------------------------------
56 * Returns the shared instance
58 * @return the shared instance
60 public static Activator
getDefault() {
64 // ------------------------------------------------------------------------
66 // ------------------------------------------------------------------------
69 public void start(BundleContext context
) throws Exception
{
75 public void stop(BundleContext context
) throws Exception
{
81 * Logs a message with severity INFO in the runtime log of the plug-in.
83 * @param message A message to log
85 public void logInfo(String message
) {
86 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
));
90 * Logs a message and exception with severity INFO in the runtime log of the plug-in.
92 * @param message A message to log
93 * @param exception A exception to log
95 public void logInfo(String message
, Throwable exception
) {
96 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
, exception
));
100 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
102 * @param message A message to log
104 public void logWarning(String message
) {
105 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
));
109 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
111 * @param message A message to log
112 * @param exception A exception to log
114 public void logWarning(String message
, Throwable exception
) {
115 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
, exception
));
119 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
121 * @param message A message to log
123 public void logError(String message
) {
124 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
));
128 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
130 * @param message A message to log
131 * @param exception A exception to log
133 public void logError(String message
, Throwable exception
) {
134 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
, exception
));
This page took 0.053522 seconds and 5 git commands to generate.