Skip to content

Package: Activator

Activator

nameinstructionbranchcomplexitylinemethod
Activator()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
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%
getImageDescriptor(String)
M: 4 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: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2014 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.rap;
16:
17: import org.eclipse.jface.resource.ImageDescriptor;
18: import org.eclipse.ui.plugin.AbstractUIPlugin;
19: import org.osgi.framework.BundleContext;
20:
21: /**
22: * The activator class controls the plug-in life cycle.
23: */
24: public class Activator extends AbstractUIPlugin {
25:
26:         /**
27:          * The plugin ID.
28:          */
29:         public static final String PLUGIN_ID = "org.eclipse.emf.ecp.rap"; //$NON-NLS-1$
30:
31:         // The shared instance
32:         private static Activator plugin;
33:
34:         /**
35:          * default constructor.
36:          */
37:         public Activator() {
38:         }
39:
40:         /*
41:          * (non-Javadoc)
42:          * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
43:          */
44:         @Override
45:         public void start(BundleContext context) throws Exception {
46:                 super.start(context);
47:                 plugin = this;
48:         }
49:
50:         /*
51:          * (non-Javadoc)
52:          * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
53:          */
54:         @Override
55:         public void stop(BundleContext context) throws Exception {
56:                 plugin = null;
57:                 super.stop(context);
58:         }
59:
60:         /**
61:          * Returns the shared instance.
62:          *
63:          * @return the shared instance
64:          */
65:         public static Activator getDefault() {
66:                 return plugin;
67:         }
68:
69:         /**
70:          * Returns an image descriptor for the image file at the given
71:          * plug-in relative path.
72:          *
73:          * @param path the path
74:          * @return the image descriptor
75:          */
76:         public static ImageDescriptor getImageDescriptor(String path) {
77:                 return imageDescriptorFromPlugin(PLUGIN_ID, path);
78:         }
79: }