Skip to content

Package: EClassifierOnlyEClassControl

EClassifierOnlyEClassControl

nameinstructionbranchcomplexitylinemethod
EClassifierOnlyEClassControl()
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%
createButtons(Composite)
M: 31 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%

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.edit.ecore.swt.internal;
15:
16: import org.eclipse.emf.ecore.EStructuralFeature.Setting;
17: import org.eclipse.emf.ecp.edit.spi.ReferenceService;
18: import org.eclipse.swt.widgets.Button;
19: import org.eclipse.swt.widgets.Composite;
20:
21: /**
22: * This is a control for {@link org.eclipse.emf.ecore.EClassifier EClassifier}s which will offer the possibility to
23: * select {@link org.eclipse.emf.ecore.EClass EClass}es. Will be used for editing the type of an
24: * {@link org.eclipse.emf.ecore.EReference EReference}.
25: *
26: * @author jfaltermeier
27: *
28: */
29: public class EClassifierOnlyEClassControl extends EClassifierControl {
30:
31:         /**
32:          * {@inheritDoc}
33:          *
34:          * @see org.eclipse.emf.ecp.edit.internal.swt.reference.LinkControl#createButtons(org.eclipse.swt.widgets.Composite)
35:          */
36:         @Override
37:         protected Button[] createButtons(Composite composite) {
38:                 final Button[] buttons = new Button[1];
39:                 final Setting setting = getFirstSetting();
40:                 buttons[0] = createButtonForAction(new AddEClassifierOnlyEClassReferenceAction(
41:                         getEditingDomain(getFirstSetting()), setting, getItemPropertyDescriptor(setting),
42:                         getService(ReferenceService.class), getVisiblePackages()), composite);
43:                 return buttons;
44:         }
45:
46: }