1 /*******************************************************************************
2 * Copyright (c) 2016 EfficiOS Inc. and others
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
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.tmf
.ctf
.ui
;
12 import static org
.eclipse
.tracecompass
.common
.core
.NonNullUtils
.checkNotNull
;
14 import org
.eclipse
.core
.runtime
.IStatus
;
15 import org
.eclipse
.core
.runtime
.Status
;
16 import org
.eclipse
.jdt
.annotation
.Nullable
;
17 import org
.eclipse
.ui
.plugin
.AbstractUIPlugin
;
18 import org
.osgi
.framework
.BundleContext
;
21 * The activator class controls the plug-in life cycle.
23 public class Activator
extends AbstractUIPlugin
{
25 // ------------------------------------------------------------------------
27 // ------------------------------------------------------------------------
30 public static final String PLUGIN_ID
= "org.eclipse.tracecompass.tmf.ctf.ui"; //$NON-NLS-1$
32 private static @Nullable Activator plugin
;
34 // ------------------------------------------------------------------------
36 // ------------------------------------------------------------------------
39 * Returns the TMF UI plug-in instance.
41 * @return the TMF UI plug-in instance.
43 public static Activator
getDefault() {
44 return checkNotNull(plugin
);
47 // ------------------------------------------------------------------------
49 // ------------------------------------------------------------------------
52 public void start(@Nullable BundleContext context
) throws Exception
{
58 public void stop(@Nullable BundleContext context
) throws Exception
{
64 // ------------------------------------------------------------------------
66 // ------------------------------------------------------------------------
69 * Logs a message with severity INFO in the runtime log of the plug-in.
74 public void logInfo(String message
) {
75 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
));
79 * Logs a message and exception with severity INFO in the runtime log of the
87 public void logInfo(String message
, Throwable exception
) {
88 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
, exception
));
92 * Logs a message and exception with severity WARNING in the runtime log of
98 public void logWarning(String message
) {
99 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
));
103 * Logs a message and exception with severity WARNING in the runtime log of
111 public void logWarning(String message
, Throwable exception
) {
112 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
, exception
));
116 * Logs a message and exception with severity ERROR in the runtime log of
122 public void logError(String message
) {
123 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
));
127 * Logs a message and exception with severity ERROR in the runtime log of
135 public void logError(String message
, Throwable exception
) {
136 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
, exception
));
This page took 0.033191 seconds and 5 git commands to generate.