1 /*******************************************************************************
2 * Copyright (c) 2009 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
.lttng
.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 // ========================================================================
32 public static final String PLUGIN_ID
= "org.eclipse.linuxtools.lttng.core"; //$NON-NLS-1$
34 // The shared instance
35 private static Activator plugin
;
37 // ========================================================================
39 // ========================================================================
47 // ========================================================================
49 // ========================================================================
52 * Returns the shared instance
54 * @return the shared instance
56 public static Activator
getDefault() {
60 // ========================================================================
62 // ========================================================================
66 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
69 public void start(BundleContext context
) throws Exception
{
77 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
80 public void stop(BundleContext context
) throws Exception
{
86 * Logs a message with severity INFO in the runtime log of the plug-in.
88 * @param message A message to log
90 public void logInfo(String message
) {
91 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
));
95 * Logs a message and exception with severity INFO in the runtime log of the plug-in.
97 * @param message A message to log
98 * @param exception A exception to log
100 public void logInfo(String message
, Throwable exception
) {
101 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
, exception
));
105 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
107 * @param message A message to log
109 public void logWarning(String message
) {
110 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
));
114 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
116 * @param message A message to log
117 * @param exception A exception to log
119 public void logWarning(String message
, Throwable exception
) {
120 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
, exception
));
124 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
126 * @param message A message to log
128 public void logError(String message
) {
129 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
));
133 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
135 * @param message A message to log
136 * @param exception A exception to log
138 public void logError(String message
, Throwable exception
) {
139 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
, exception
));
This page took 0.037127 seconds and 5 git commands to generate.