1 /*******************************************************************************
2 * Copyright (c) 2012 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 // ------------------------------------------------------------------------
70 * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
73 public void start(BundleContext context
) throws Exception
{
80 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
83 public void stop(BundleContext context
) throws Exception
{
89 * Logs a message with severity INFO in the runtime log of the plug-in.
91 * @param message A message to log
93 public void logInfo(String message
) {
94 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
));
98 * Logs a message and exception with severity INFO in the runtime log of the plug-in.
100 * @param message A message to log
101 * @param exception A exception to log
103 public void logInfo(String message
, Throwable exception
) {
104 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
, exception
));
108 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
110 * @param message A message to log
112 public void logWarning(String message
) {
113 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
));
117 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
119 * @param message A message to log
120 * @param exception A exception to log
122 public void logWarning(String message
, Throwable exception
) {
123 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
, exception
));
127 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
129 * @param message A message to log
131 public void logError(String message
) {
132 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
));
136 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
138 * @param message A message to log
139 * @param exception A exception to log
141 public void logError(String message
, Throwable exception
) {
142 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
, exception
));
This page took 0.033726 seconds and 6 git commands to generate.