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: 1
100%
M: 0 C: 1
100%
getContext()
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%
start(BundleContext)
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%
stop(BundleContext)
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%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2012 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: * Eugen Neufeld - initial API and implementation
13: *
14: *******************************************************************************/
15: package org.eclipse.emf.ecp.core.emffilter.internal;
16:
17: import org.osgi.framework.BundleActivator;
18: import org.osgi.framework.BundleContext;
19:
20: /**
21: * The activator class controls the plug-in life cycle.
22: */
23: public class Activator implements BundleActivator {
24:
25:         private static BundleContext context;
26:
27:         /**
28:          * Returns the shared instance.
29:          *
30:          * @return the shared instance
31:          */
32:         static BundleContext getContext() {
33:                 return context;
34:         }
35:
36:         // BEGIN SUPRESS CATCH EXCEPTION
37:         /**
38:          * {@inheritDoc}
39:          */
40:         @Override
41:         public void start(BundleContext bundleContext) throws Exception {
42:                 Activator.context = bundleContext;
43:         }
44:
45:         /**
46:          * {@inheritDoc}
47:          */
48:         @Override
49:         public void stop(BundleContext bundleContext) throws Exception {
50:                 Activator.context = null;
51:         }
52:         // END SUPRESS CATCH EXCEPTION
53: }