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%
getDefault()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getImageDescriptor(String)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
start(BundleContext)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
stop(BundleContext)
M: 0 C: 6
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 3
100%
M: 0 C: 1
100%

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: * jfaltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.internal.ui.validation;
15:
16: import org.eclipse.core.runtime.Plugin;
17: import org.eclipse.jface.resource.ImageDescriptor;
18: import org.osgi.framework.BundleContext;
19:
20: /**
21: * The activator for this bundle.
22: *
23: * @author jfaltermeier
24: *
25: */
26: public class Activator extends Plugin {
27:
28:         /**
29:          * The plug-in ID.
30:          */
31:         public static final String PLUGIN_ID = "org.eclipse.emf.ecp.ui.validation"; //$NON-NLS-1$
32:
33:         /**
34:          * The shared instance.
35:          */
36:         private static Activator plugin;
37:
38:         /**
39:          * {@inheritDoc}
40:          */
41:         @Override
42:         public void start(BundleContext context) throws Exception {
43:                 super.start(context);
44:                 plugin = this;
45:         }
46:
47:         /**
48:          * {@inheritDoc}
49:          */
50:         @Override
51:         public void stop(BundleContext context) throws Exception {
52:                 plugin = null;
53:                 super.stop(context);
54:         }
55:
56:         /**
57:          * Returns the shared instance.
58:          *
59:          * @return the shared instance
60:          */
61:         public static Activator getDefault() {
62:                 return plugin;
63:         }
64:
65:         /**
66:          * Returns an {@link ImageDescriptor} for the image file at the given plug-in
67:          * relative path.
68:          *
69:          * @param path
70:          * the path
71:          * @return the image descriptor
72:          */
73:         public static ImageDescriptor getImageDescriptor(String path) {
74:                 return ImageDescriptor.createFromURL(getDefault().getBundle().getResource(path));
75:         }
76:
77: }