Skip to content

Package: CoffeeWizardsPlugin

CoffeeWizardsPlugin

nameinstructionbranchcomplexitylinemethod
CoffeeWizardsPlugin()
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
getPlugin()
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%
getPluginResourceLocator()
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%
static {...}
M: 5 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.coffee.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.coffee.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: * @see #INSTANCE
31: */
32: public final class CoffeeWizardsPlugin extends EMFPlugin {
33:         /**
34:          * The singleton instance of the plugin.
35:          */
36:         public static final CoffeeWizardsPlugin INSTANCE = new CoffeeWizardsPlugin();
37:
38:         /**
39:          * The one instance of this class.
40:          */
41:         private static Implementation plugin;
42:
43:         /**
44:          * Creates the singleton instance.
45:          */
46:         private CoffeeWizardsPlugin() {
47:                 super(new ResourceLocator[] {});
48:         }
49:
50:         @Override
51:         public ResourceLocator getPluginResourceLocator() {
52:                 return plugin;
53:         }
54:
55:         /**
56:          * Returns the singleton instance of the Eclipse plugin.
57:          *
58:          * @return the singleton instance.
59:          */
60:         public static Implementation getPlugin() {
61:                 return plugin;
62:         }
63:
64:         /**
65:          * The actual implementation of the Eclipse <b>Plugin</b>.
66:          */
67:         public static class Implementation extends EclipseUIPlugin {
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:
77:                         super.stop(context);
78:                 }
79:         }
80: }