Skip to content

Package: ExampleWizardsPlugin$Implementation

ExampleWizardsPlugin$Implementation

nameinstructionbranchcomplexitylinemethod
ExampleWizardsPlugin.Implementation()
M: 3 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: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
stop(BundleContext)
M: 4 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2018 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: * Lucas Koehler - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.internal.example.wizards;
15:
16: import org.eclipse.emf.common.EMFPlugin;
17: import org.eclipse.emf.common.ui.EclipseUIPlugin;
18: import org.eclipse.emf.common.util.ResourceLocator;
19: import org.osgi.framework.BundleContext;
20:
21: /**
22: * The <b>Plugin</b> for the org.eclipse.emfforms.example.wizards bundle.
23: * EMF must run within an Eclipse workbench, within a headless Eclipse workspace,
24: * or just stand-alone as part of some other application.
25: * To support this, all resource access should be directed to the resource locator,
26: * which can redirect the service as appropriate to the runtime.
27: * During stand-alone invocation no plugin initialization takes place.
28: * In this case, common.resources.jar must be on the CLASSPATH.
29: *
30: * @author Lucas Koehler
31: * @see #INSTANCE
32: */
33: public final class ExampleWizardsPlugin extends EMFPlugin {
34:         /**
35:          * The singleton instance of the plugin.
36:          */
37:         public static final ExampleWizardsPlugin INSTANCE = new ExampleWizardsPlugin();
38:
39:         /**
40:          * The one instance of this class.
41:          */
42:         private static Implementation plugin;
43:
44:         /**
45:          * Creates the singleton instance.
46:          */
47:         private ExampleWizardsPlugin() {
48:                 super(new ResourceLocator[] {});
49:         }
50:
51:         @Override
52:         public ResourceLocator getPluginResourceLocator() {
53:                 return plugin;
54:         }
55:
56:         /**
57:          * Returns the singleton instance of the Eclipse plugin.
58:          *
59:          * @return the singleton instance.
60:          */
61:         public static Implementation getPlugin() {
62:                 return plugin;
63:         }
64:
65:         /**
66:          * The actual implementation of the Eclipse <b>Plugin</b>.
67:          */
68:         public static class Implementation extends EclipseUIPlugin {
69:                 @Override
70:                 public void start(BundleContext context) throws Exception {
71:                         super.start(context);
72:                         plugin = this;
73:                 }
74:
75:                 @Override
76:                 public void stop(BundleContext context) throws Exception {
77:
78:                         super.stop(context);
79:                 }
80:         }
81: }