1 /*******************************************************************************
2 * Copyright (c) 2009, 2010, 2011 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
.tmf
.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>TmfCorePlugin</u></b>
23 * The activator class controls the plug-in life cycle. No more than one such
24 * plug-in can exist at any time.
26 public class Activator
extends Plugin
{
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
35 public static final String PLUGIN_ID
= "org.eclipse.linuxtools.tmf.core"; //$NON-NLS-1$
40 private static Activator fPlugin
;
42 // ------------------------------------------------------------------------
44 // ------------------------------------------------------------------------
53 // ------------------------------------------------------------------------
55 // ------------------------------------------------------------------------
58 * Returns the TMF UI plug-in instance.
60 * @return the TMF UI plug-in instance.
62 public static Activator
getDefault() {
66 // Sets plug-in instance
67 private static void setDefault(Activator plugin
) {
71 // ------------------------------------------------------------------------
73 // ------------------------------------------------------------------------
77 * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
80 public void start(BundleContext context
) throws Exception
{
88 * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
91 public void stop(BundleContext context
) throws Exception
{
98 * Logs a message with severity INFO in the runtime log of the plug-in.
100 * @param message A message to log
102 public void logInfo(String message
) {
103 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
));
107 * Logs a message and exception with severity INFO in the runtime log of the plug-in.
109 * @param message A message to log
110 * @param exception A exception to log
112 public void logInfo(String message
, Throwable exception
) {
113 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
, exception
));
117 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
119 * @param message A message to log
121 public void logWarning(String message
) {
122 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
));
126 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
128 * @param message A message to log
129 * @param exception A exception to log
131 public void logWarning(String message
, Throwable exception
) {
132 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
, exception
));
136 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
138 * @param message A message to log
140 public void logError(String message
) {
141 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
));
145 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
147 * @param message A message to log
148 * @param exception A exception to log
150 public void logError(String message
, Throwable exception
) {
151 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
, exception
));
This page took 0.034818 seconds and 5 git commands to generate.