Skip to content

Package: Activator

Activator

nameinstructionbranchcomplexitylinemethod
Activator()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
getDefault()
M: 2 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
log(Throwable)
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
start(BundleContext)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
stop(BundleContext)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Johannes Faltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.internal.stack.ui.swt;
15:
16: import org.eclipse.core.runtime.IStatus;
17: import org.eclipse.core.runtime.Plugin;
18: import org.eclipse.core.runtime.Status;
19: import org.osgi.framework.BundleContext;
20:
21: /**
22: * The activator class controls the plug-in life cycle.
23: */
24: public class Activator extends Plugin {
25:
26:         /** The plug-in ID. */
27:         public static final String PLUGIN_ID = "org.eclipse.emf.ecp.view.stack.ui.swt"; //$NON-NLS-1$
28:
29:         /** The shared instance. */
30:         private static Activator plugin;
31:
32:         /**
33:          * The constructor.
34:          */
35:         public Activator() {
36:         }
37:
38:         @Override
39:         public void start(BundleContext context) throws Exception {
40:                 super.start(context);
41:                 plugin = this;
42:         }
43:
44:         @Override
45:         public void stop(BundleContext context) throws Exception {
46:                 plugin = null;
47:                 super.stop(context);
48:         }
49:
50:         /**
51:          * Returns the shared instance.
52:          *
53:          * @return the shared instance
54:          */
55:         public static Activator getDefault() {
56:                 return plugin;
57:         }
58:
59:         /**
60:          * Log an Exception.
61:          *
62:          * @param throwable the {@link Throwable} to log
63:          */
64:         public static void log(Throwable throwable) {
65:                 plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, throwable.getMessage(), throwable));
66:         }
67: }