Skip to content

Package: InterfaceDelegator

InterfaceDelegator

nameinstructionbranchcomplexitylinemethod
InterfaceDelegator(EMFFormsSettingToControlMapper)
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%
checkAndUpdateSettingToControlMapping(EObject)
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%
getControlsFor(EStructuralFeature.Setting)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getControlsFor(UniqueSetting)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getEObjectsWithSettings()
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%
getSettingsForControl(VControl)
M: 5 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
hasControlsFor(EObject)
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
updateControlMapping(VControl)
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%
vControlAdded(VControl)
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%
vControlRemoved(VControl)
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) 2019 Christian W. Damus 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: * Christian W. Damus - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emfforms.internal.core.services.scoped;
15:
16: import java.util.Collection;
17: import java.util.Set;
18:
19: import org.eclipse.emf.ecore.EObject;
20: import org.eclipse.emf.ecore.EStructuralFeature.Setting;
21: import org.eclipse.emf.ecp.common.spi.UniqueSetting;
22: import org.eclipse.emf.ecp.view.spi.model.VControl;
23: import org.eclipse.emf.ecp.view.spi.model.VElement;
24: import org.eclipse.emfforms.spi.core.services.controlmapper.EMFFormsSettingToControlMapper;
25:
26: /**
27: * A delegator for testing default methods of the {@link EMFFormsSettingToControlMapper} interface.
28: */
29: class InterfaceDelegator implements EMFFormsSettingToControlMapper {
30:
31:         private final EMFFormsSettingToControlMapper delegate;
32:
33:         /**
34:          * Initializes me with my delegate.
35:          */
36:         InterfaceDelegator(EMFFormsSettingToControlMapper delegate) {
37:                 super();
38:
39:                 this.delegate = delegate;
40:         }
41:
42:         @Override
43:         public Set<VControl> getControlsFor(Setting setting) {
44:                 return delegate.getControlsFor(setting);
45:         }
46:
47:         @Override
48:         public Set<VElement> getControlsFor(UniqueSetting setting) {
49:                 return delegate.getControlsFor(setting);
50:         }
51:
52:         @Override
53:         public void updateControlMapping(VControl vControl) {
54:                 delegate.updateControlMapping(vControl);
55:         }
56:
57:         @Override
58:         public void vControlAdded(VControl vControl) {
59:                 delegate.vControlAdded(vControl);
60:         }
61:
62:         @Override
63:         public void vControlRemoved(VControl vControl) {
64:                 delegate.vControlRemoved(vControl);
65:         }
66:
67:         @Override
68:         public void checkAndUpdateSettingToControlMapping(EObject eObject) {
69:                 delegate.checkAndUpdateSettingToControlMapping(eObject);
70:         }
71:
72:         @Override
73:         public boolean hasControlsFor(EObject eObject) {
74:                 return delegate.hasControlsFor(eObject);
75:         }
76:
77:         @Override
78:         public Collection<EObject> getEObjectsWithSettings() {
79:                 return delegate.getEObjectsWithSettings();
80:         }
81:
82:         @Override
83:         public Set<UniqueSetting> getSettingsForControl(VControl control) {
84:                 return delegate.getSettingsForControl(control);
85:         }
86:
87: }