1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 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
.kernel
.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
.linuxtools
.lttng2
.kernel
.core
.event
.matching
.TcpEventMatching
;
19 import org
.eclipse
.linuxtools
.lttng2
.kernel
.core
.event
.matching
.TcpLttngEventMatching
;
20 import org
.eclipse
.tracecompass
.tmf
.core
.event
.matching
.TmfEventMatching
;
21 import org
.osgi
.framework
.BundleContext
;
24 * <b><u>Activator</u></b>
26 * The activator class controls the plug-in life cycle
28 public class Activator
extends Plugin
{
30 // ------------------------------------------------------------------------
32 // ------------------------------------------------------------------------
37 public static final String PLUGIN_ID
= "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
42 private static Activator plugin
;
44 // ------------------------------------------------------------------------
46 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
56 // ------------------------------------------------------------------------
59 * Returns the shared instance
61 * @return the shared instance
63 public static Activator
getDefault() {
67 // ------------------------------------------------------------------------
69 // ------------------------------------------------------------------------
72 public void start(BundleContext context
) throws Exception
{
75 TmfEventMatching
.registerMatchObject(new TcpEventMatching());
76 TmfEventMatching
.registerMatchObject(new TcpLttngEventMatching());
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.034248 seconds and 5 git commands to generate.