Skip to content

Package: VCompoundControlImpl

VCompoundControlImpl

nameinstructionbranchcomplexitylinemethod
VCompoundControlImpl()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 11 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 15 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 6 C: 11
65%
M: 3 C: 3
50%
M: 2 C: 2
50%
M: 0 C: 3
100%
M: 0 C: 1
100%
eSet(int, Object)
M: 17 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
eStaticClass()
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%
eUnset(int)
M: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getControls()
M: 14 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 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: * Johannes Faltermeier - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.compoundcontrol.model.impl;
15:
16: import java.util.Collection;
17:
18: import org.eclipse.emf.common.notify.NotificationChain;
19: import org.eclipse.emf.common.util.EList;
20: import org.eclipse.emf.ecore.EClass;
21: import org.eclipse.emf.ecore.InternalEObject;
22: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
23: import org.eclipse.emf.ecore.util.InternalEList;
24: import org.eclipse.emf.ecp.view.spi.compoundcontrol.model.VCompoundControl;
25: import org.eclipse.emf.ecp.view.spi.compoundcontrol.model.VCompoundcontrolPackage;
26: import org.eclipse.emf.ecp.view.spi.model.VControl;
27: import org.eclipse.emf.ecp.view.spi.model.impl.VControlImpl;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * An implementation of the model object '<em><b>Compound Control</b></em>'.
32: * <!-- end-user-doc -->
33: * <p>
34: * The following features are implemented:
35: * </p>
36: * <ul>
37: * <li>{@link org.eclipse.emf.ecp.view.spi.compoundcontrol.model.impl.VCompoundControlImpl#getControls <em>Controls</em>
38: * }</li>
39: * </ul>
40: *
41: * @generated
42: */
43: public class VCompoundControlImpl extends VControlImpl implements VCompoundControl {
44:         /**
45:          * The cached value of the '{@link #getControls() <em>Controls</em>}' containment reference list.
46:          * <!-- begin-user-doc -->
47:          * <!-- end-user-doc -->
48:          *
49:          * @see #getControls()
50:          * @generated
51:          * @ordered
52:          */
53:         protected EList<VControl> controls;
54:
55:         /**
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @generated
60:          */
61:         protected VCompoundControlImpl() {
62:                 super();
63:         }
64:
65:         /**
66:          * <!-- begin-user-doc -->
67:          * <!-- end-user-doc -->
68:          *
69:          * @generated
70:          */
71:         @Override
72:         protected EClass eStaticClass() {
73:                 return VCompoundcontrolPackage.Literals.COMPOUND_CONTROL;
74:         }
75:
76:         /**
77:          * <!-- begin-user-doc -->
78:          * <!-- end-user-doc -->
79:          *
80:          * @generated
81:          */
82:         @Override
83:         public EList<VControl> getControls() {
84:•                if (controls == null) {
85:                         controls = new EObjectContainmentEList<VControl>(VControl.class, this,
86:                                 VCompoundcontrolPackage.COMPOUND_CONTROL__CONTROLS);
87:                 }
88:                 return controls;
89:         }
90:
91:         /**
92:          * <!-- begin-user-doc -->
93:          * <!-- end-user-doc -->
94:          *
95:          * @generated
96:          */
97:         @Override
98:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
99:•                switch (featureID) {
100:                 case VCompoundcontrolPackage.COMPOUND_CONTROL__CONTROLS:
101:                         return ((InternalEList<?>) getControls()).basicRemove(otherEnd, msgs);
102:                 }
103:                 return super.eInverseRemove(otherEnd, featureID, msgs);
104:         }
105:
106:         /**
107:          * <!-- begin-user-doc -->
108:          * <!-- end-user-doc -->
109:          *
110:          * @generated
111:          */
112:         @Override
113:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
114:•                switch (featureID) {
115:                 case VCompoundcontrolPackage.COMPOUND_CONTROL__CONTROLS:
116:                         return getControls();
117:                 }
118:                 return super.eGet(featureID, resolve, coreType);
119:         }
120:
121:         /**
122:          * <!-- begin-user-doc -->
123:          * <!-- end-user-doc -->
124:          *
125:          * @generated
126:          */
127:         @SuppressWarnings("unchecked")
128:         @Override
129:         public void eSet(int featureID, Object newValue) {
130:•                switch (featureID) {
131:                 case VCompoundcontrolPackage.COMPOUND_CONTROL__CONTROLS:
132:                         getControls().clear();
133:                         getControls().addAll((Collection<? extends VControl>) newValue);
134:                         return;
135:                 }
136:                 super.eSet(featureID, newValue);
137:         }
138:
139:         /**
140:          * <!-- begin-user-doc -->
141:          * <!-- end-user-doc -->
142:          *
143:          * @generated
144:          */
145:         @Override
146:         public void eUnset(int featureID) {
147:•                switch (featureID) {
148:                 case VCompoundcontrolPackage.COMPOUND_CONTROL__CONTROLS:
149:                         getControls().clear();
150:                         return;
151:                 }
152:                 super.eUnset(featureID);
153:         }
154:
155:         /**
156:          * <!-- begin-user-doc -->
157:          * <!-- end-user-doc -->
158:          *
159:          * @generated
160:          */
161:         @Override
162:         public boolean eIsSet(int featureID) {
163:•                switch (featureID) {
164:                 case VCompoundcontrolPackage.COMPOUND_CONTROL__CONTROLS:
165:•                        return controls != null && !controls.isEmpty();
166:                 }
167:                 return super.eIsSet(featureID);
168:         }
169:
170: } // VCompoundControlImpl