1 /*******************************************************************************
2 * Copyright (c) 2014 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 * Vincent Perot - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.pcap
.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 final class Activator
extends Plugin
{
28 // ------------------------------------------------------------------------
30 // ------------------------------------------------------------------------
35 public static final String PLUGIN_ID
= "org.eclipse.linuxtools.pcap.core"; //$NON-NLS-1$
40 private static @Nullable Activator plugin
;
42 // ------------------------------------------------------------------------
44 // ------------------------------------------------------------------------
52 // ------------------------------------------------------------------------
54 // ------------------------------------------------------------------------
57 * Returns the shared instance
59 * @return the shared instance
61 public static @Nullable Activator
getDefault() {
65 // ------------------------------------------------------------------------
67 // ------------------------------------------------------------------------
70 public void start(@Nullable BundleContext context
) throws Exception
{
76 public void stop(@Nullable BundleContext context
) throws Exception
{
82 * Logs a message with severity INFO in the runtime log of the plug-in.
84 * @param message A message to log
86 public void logInfo(String message
) {
87 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
));
91 * Logs a message and exception with severity INFO in the runtime log of the plug-in.
93 * @param message A message to log
94 * @param exception A exception to log
96 public void logInfo(String message
, Throwable exception
) {
97 getLog().log(new Status(IStatus
.INFO
, PLUGIN_ID
, message
, exception
));
101 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
103 * @param message A message to log
105 public void logWarning(String message
) {
106 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
));
110 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
112 * @param message A message to log
113 * @param exception A exception to log
115 public void logWarning(String message
, Throwable exception
) {
116 getLog().log(new Status(IStatus
.WARNING
, PLUGIN_ID
, message
, exception
));
120 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
122 * @param message A message to log
124 public void logError(String message
) {
125 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
));
129 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
131 * @param message A message to log
132 * @param exception A exception to log
134 public void logError(String message
, Throwable exception
) {
135 getLog().log(new Status(IStatus
.ERROR
, PLUGIN_ID
, message
, exception
));
This page took 0.053079 seconds and 6 git commands to generate.