Skip to content

Package: VMultiDomainModelReferenceSegmentImpl

VMultiDomainModelReferenceSegmentImpl

nameinstructionbranchcomplexitylinemethod
VMultiDomainModelReferenceSegmentImpl()
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: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 6 C: 9
60%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
eIsSet(int)
M: 0 C: 17
100%
M: 1 C: 5
83%
M: 1 C: 3
75%
M: 0 C: 3
100%
M: 0 C: 1
100%
eSet(int, Object)
M: 10 C: 7
41%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 3 C: 3
50%
M: 0 C: 1
100%
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%
getChildDomainModelReferences()
M: 0 C: 14
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 4
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2019 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: * Lucas Koehler - initial API and implementation
13: */
14: package org.eclipse.emfforms.view.spi.multisegment.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.model.VDomainModelReference;
25: import org.eclipse.emf.ecp.view.spi.model.impl.VFeatureDomainModelReferenceSegmentImpl;
26: import org.eclipse.emfforms.view.spi.multisegment.model.VMultiDomainModelReferenceSegment;
27: import org.eclipse.emfforms.view.spi.multisegment.model.VMultisegmentPackage;
28:
29: /**
30: * <!-- begin-user-doc -->
31: * An implementation of the model object '<em><b>Multi Domain Model Reference Segment</b></em>'.
32: * <!-- end-user-doc -->
33: * <p>
34: * The following features are implemented:
35: * </p>
36: * <ul>
37: * <li>{@link org.eclipse.emfforms.view.spi.multisegment.model.impl.VMultiDomainModelReferenceSegmentImpl#getChildDomainModelReferences
38: * <em>Child Domain Model References</em>}</li>
39: * </ul>
40: *
41: * @generated
42: */
43: public class VMultiDomainModelReferenceSegmentImpl extends VFeatureDomainModelReferenceSegmentImpl
44:         implements VMultiDomainModelReferenceSegment {
45:         /**
46:          * The cached value of the '{@link #getChildDomainModelReferences() <em>Child Domain Model References</em>}'
47:          * containment reference list.
48:          * <!-- begin-user-doc -->
49:          * <!-- end-user-doc -->
50:          *
51:          * @see #getChildDomainModelReferences()
52:          * @generated
53:          * @ordered
54:          */
55:         protected EList<VDomainModelReference> childDomainModelReferences;
56:
57:         /**
58:          * <!-- begin-user-doc -->
59:          * <!-- end-user-doc -->
60:          *
61:          * @generated
62:          */
63:         protected VMultiDomainModelReferenceSegmentImpl() {
64:                 super();
65:         }
66:
67:         /**
68:          * <!-- begin-user-doc -->
69:          * <!-- end-user-doc -->
70:          *
71:          * @generated
72:          */
73:         @Override
74:         protected EClass eStaticClass() {
75:                 return VMultisegmentPackage.Literals.MULTI_DOMAIN_MODEL_REFERENCE_SEGMENT;
76:         }
77:
78:         /**
79:          * <!-- begin-user-doc -->
80:          * <!-- end-user-doc -->
81:          *
82:          * @generated
83:          */
84:         @Override
85:         public EList<VDomainModelReference> getChildDomainModelReferences() {
86:•                if (childDomainModelReferences == null) {
87:                         childDomainModelReferences = new EObjectContainmentEList<>(VDomainModelReference.class,
88:                                 this, VMultisegmentPackage.MULTI_DOMAIN_MODEL_REFERENCE_SEGMENT__CHILD_DOMAIN_MODEL_REFERENCES);
89:                 }
90:                 return childDomainModelReferences;
91:         }
92:
93:         /**
94:          * <!-- begin-user-doc -->
95:          * <!-- end-user-doc -->
96:          *
97:          * @generated
98:          */
99:         @Override
100:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
101:•                switch (featureID) {
102:                 case VMultisegmentPackage.MULTI_DOMAIN_MODEL_REFERENCE_SEGMENT__CHILD_DOMAIN_MODEL_REFERENCES:
103:                         return ((InternalEList<?>) getChildDomainModelReferences()).basicRemove(otherEnd, msgs);
104:                 }
105:                 return super.eInverseRemove(otherEnd, featureID, msgs);
106:         }
107:
108:         /**
109:          * <!-- begin-user-doc -->
110:          * <!-- end-user-doc -->
111:          *
112:          * @generated
113:          */
114:         @Override
115:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
116:•                switch (featureID) {
117:                 case VMultisegmentPackage.MULTI_DOMAIN_MODEL_REFERENCE_SEGMENT__CHILD_DOMAIN_MODEL_REFERENCES:
118:                         return getChildDomainModelReferences();
119:                 }
120:                 return super.eGet(featureID, resolve, coreType);
121:         }
122:
123:         /**
124:          * <!-- begin-user-doc -->
125:          * <!-- end-user-doc -->
126:          *
127:          * @generated
128:          */
129:         @SuppressWarnings("unchecked")
130:         @Override
131:         public void eSet(int featureID, Object newValue) {
132:•                switch (featureID) {
133:                 case VMultisegmentPackage.MULTI_DOMAIN_MODEL_REFERENCE_SEGMENT__CHILD_DOMAIN_MODEL_REFERENCES:
134:                         getChildDomainModelReferences().clear();
135:                         getChildDomainModelReferences().addAll((Collection<? extends VDomainModelReference>) newValue);
136:                         return;
137:                 }
138:                 super.eSet(featureID, newValue);
139:         }
140:
141:         /**
142:          * <!-- begin-user-doc -->
143:          * <!-- end-user-doc -->
144:          *
145:          * @generated
146:          */
147:         @Override
148:         public void eUnset(int featureID) {
149:•                switch (featureID) {
150:                 case VMultisegmentPackage.MULTI_DOMAIN_MODEL_REFERENCE_SEGMENT__CHILD_DOMAIN_MODEL_REFERENCES:
151:                         getChildDomainModelReferences().clear();
152:                         return;
153:                 }
154:                 super.eUnset(featureID);
155:         }
156:
157:         /**
158:          * <!-- begin-user-doc -->
159:          * <!-- end-user-doc -->
160:          *
161:          * @generated
162:          */
163:         @Override
164:         public boolean eIsSet(int featureID) {
165:•                switch (featureID) {
166:                 case VMultisegmentPackage.MULTI_DOMAIN_MODEL_REFERENCE_SEGMENT__CHILD_DOMAIN_MODEL_REFERENCES:
167:•                        return childDomainModelReferences != null && !childDomainModelReferences.isEmpty();
168:                 }
169:                 return super.eIsSet(featureID);
170:         }
171:
172: } // VMultiDomainModelReferenceSegmentImpl