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-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.ui.editor.test;
15:
16: import org.osgi.framework.BundleActivator;
17: import org.osgi.framework.BundleContext;
18:
19: public class Activator implements BundleActivator {
20:
21:         private static BundleContext context;
22:
23:         static BundleContext getContext() {
24:                 return context;
25:         }
26:
27:         /*
28:          * (non-Javadoc)
29:          * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
30:          */
31:         @Override
32:         public void start(BundleContext bundleContext) throws Exception {
33:                 Activator.context = bundleContext;
34:         }
35:
36:         /*
37:          * (non-Javadoc)
38:          * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
39:          */
40:         @Override
41:         public void stop(BundleContext bundleContext) throws Exception {
42:                 Activator.context = null;
43:         }
44:
45: }