lttng: Add a diagram showing the dependencies between plugins
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.core / src / org / eclipse / linuxtools / internal / lttng2 / core / Activator.java
CommitLineData
79b33284 1/*******************************************************************************
11252342
AM
2 * Copyright (c) 2012, 2013 Ericsson
3 *
79b33284
FC
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
11252342 8 *
79b33284
FC
9 * Contributors:
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
12
1ee4d327 13package org.eclipse.linuxtools.internal.lttng2.core;
79b33284 14
9fa32496 15import org.eclipse.core.runtime.IStatus;
79b33284 16import org.eclipse.core.runtime.Plugin;
9fa32496 17import org.eclipse.core.runtime.Status;
79b33284
FC
18import org.osgi.framework.BundleContext;
19
20/**
21 * <b><u>Activator</u></b>
22 * <p>
23 * The activator class controls the plug-in life cycle
24 */
25public class Activator extends Plugin {
26
27 // ------------------------------------------------------------------------
28 // Attributes
29 // ------------------------------------------------------------------------
30
11252342
AM
31 /**
32 * The plug-in ID
33 */
34 public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
35
36 /**
37 * The shared instance
38 */
39 private static Activator plugin;
79b33284 40
79b33284
FC
41 // ------------------------------------------------------------------------
42 // Constructors
43 // ------------------------------------------------------------------------
44
11252342
AM
45 /**
46 * The constructor
47 */
48 public Activator() {
49 }
79b33284
FC
50
51 // ------------------------------------------------------------------------
52 // Accessors
53 // ------------------------------------------------------------------------
54
11252342
AM
55 /**
56 * Returns the shared instance
57 *
58 * @return the shared instance
59 */
60 public static Activator getDefault() {
61 return plugin;
62 }
79b33284
FC
63
64 // ------------------------------------------------------------------------
65 // Operators
66 // ------------------------------------------------------------------------
67
11252342
AM
68 @Override
69 public void start(BundleContext context) throws Exception {
70 super.start(context);
71 plugin = this;
72 }
73
74 @Override
75 public void stop(BundleContext context) throws Exception {
76 plugin = null;
77 super.stop(context);
78 }
79
9fa32496
BH
80 /**
81 * Logs a message with severity INFO in the runtime log of the plug-in.
11252342 82 *
9fa32496
BH
83 * @param message A message to log
84 */
85 public void logInfo(String message) {
86 getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
87 }
11252342 88
9fa32496
BH
89 /**
90 * Logs a message and exception with severity INFO in the runtime log of the plug-in.
11252342 91 *
9fa32496
BH
92 * @param message A message to log
93 * @param exception A exception to log
94 */
95 public void logInfo(String message, Throwable exception) {
96 getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
97 }
98
99 /**
100 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
11252342 101 *
9fa32496
BH
102 * @param message A message to log
103 */
104 public void logWarning(String message) {
105 getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
106 }
11252342 107
9fa32496
BH
108 /**
109 * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
11252342 110 *
9fa32496
BH
111 * @param message A message to log
112 * @param exception A exception to log
113 */
114 public void logWarning(String message, Throwable exception) {
115 getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
116 }
79b33284 117
9fa32496
BH
118 /**
119 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
11252342 120 *
9fa32496
BH
121 * @param message A message to log
122 */
123 public void logError(String message) {
124 getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
125 }
11252342 126
9fa32496
BH
127 /**
128 * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
11252342 129 *
9fa32496
BH
130 * @param message A message to log
131 * @param exception A exception to log
132 */
133 public void logError(String message, Throwable exception) {
134 getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
135 }
79b33284 136}
This page took 0.042294 seconds and 5 git commands to generate.