1 /*******************************************************************************
2 * Copyright (c) 2015 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 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.analysis
.os
.linux
.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
.eclipse
.jdt
.annotation
.Nullable
;
19 import org
.osgi
.framework
.BundleContext
;
22 * <b><u>Activator</u></b>
24 * The activator class controls the plug-in life cycle
26 public class Activator
extends Plugin
{
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
35 public static final String PLUGIN_ID
= "org.eclipse.tracecompass.analysis.linux.core"; //$NON-NLS-1$
40 private static @Nullable Activator fPlugin
;
42 // ------------------------------------------------------------------------
44 // ------------------------------------------------------------------------
52 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
57 * Returns the shared instance
59 * @return the shared instance
61 public static Activator
getDefault() {
62 Activator plugin
= fPlugin
;
64 throw new IllegalStateException();
69 // ------------------------------------------------------------------------
71 // ------------------------------------------------------------------------
74 public void start(@Nullable BundleContext context
) throws Exception
{
80 public void stop(@Nullable 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.04948 seconds and 5 git commands to generate.