Skip to content

Package: DomainIntermediateImpl

DomainIntermediateImpl

nameinstructionbranchcomplexitylinemethod
DomainIntermediateImpl()
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%
basicSetTestElementContainer(TestElementContainer, NotificationChain)
M: 18 C: 11
38%
M: 3 C: 1
25%
M: 2 C: 1
33%
M: 7 C: 4
36%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 6 C: 5
45%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 1 C: 2
67%
M: 0 C: 1
100%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 13 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: 7
54%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 1 C: 2
67%
M: 0 C: 1
100%
eSet(int, Object)
M: 12 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 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%
getTestElementContainer()
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%
setTestElementContainer(TestElementContainer)
M: 25 C: 27
52%
M: 6 C: 4
40%
M: 5 C: 1
17%
M: 7 C: 9
56%
M: 0 C: 1
100%

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: * Edgar Mueller - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.dynamictree.model.impl;
15:
16: import org.eclipse.emf.common.notify.Notification;
17: import org.eclipse.emf.common.notify.NotificationChain;
18: import org.eclipse.emf.ecore.EClass;
19: import org.eclipse.emf.ecore.InternalEObject;
20: import org.eclipse.emf.ecore.impl.ENotificationImpl;
21: import org.eclipse.emf.ecore.impl.EObjectImpl;
22: import org.eclipse.emf.ecp.view.dynamictree.model.DomainIntermediate;
23: import org.eclipse.emf.ecp.view.dynamictree.model.ModelPackage;
24: import org.eclipse.emf.ecp.view.dynamictree.model.TestElementContainer;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model object '<em><b>Domain Intermediate</b></em>'.
29: * <!-- end-user-doc -->
30: * <p>
31: * The following features are implemented:
32: * <ul>
33: * <li>{@link org.eclipse.emf.ecp.view.dynamictree.model.impl.DomainIntermediateImpl#getTestElementContainer <em>Test
34: * Element Container</em>}</li>
35: * </ul>
36: * </p>
37: *
38: * @generated
39: */
40: public class DomainIntermediateImpl extends EObjectImpl implements DomainIntermediate {
41:         /**
42:          * The cached value of the '{@link #getTestElementContainer() <em>Test Element Container</em>}' containment
43:          * reference.
44:          * <!-- begin-user-doc -->
45:          * <!-- end-user-doc -->
46:          *
47:          * @see #getTestElementContainer()
48:          * @generated
49:          * @ordered
50:          */
51:         protected TestElementContainer testElementContainer;
52:
53:         /**
54:          * <!-- begin-user-doc -->
55:          * <!-- end-user-doc -->
56:          *
57:          * @generated
58:          */
59:         protected DomainIntermediateImpl() {
60:                 super();
61:         }
62:
63:         /**
64:          * <!-- begin-user-doc -->
65:          * <!-- end-user-doc -->
66:          *
67:          * @generated
68:          */
69:         @Override
70:         protected EClass eStaticClass() {
71:                 return ModelPackage.Literals.DOMAIN_INTERMEDIATE;
72:         }
73:
74:         /**
75:          * <!-- begin-user-doc -->
76:          * <!-- end-user-doc -->
77:          *
78:          * @generated
79:          */
80:         @Override
81:         public TestElementContainer getTestElementContainer() {
82:                 return testElementContainer;
83:         }
84:
85:         /**
86:          * <!-- begin-user-doc -->
87:          * <!-- end-user-doc -->
88:          *
89:          * @generated
90:          */
91:         public NotificationChain basicSetTestElementContainer(TestElementContainer newTestElementContainer,
92:                 NotificationChain msgs) {
93:                 final TestElementContainer oldTestElementContainer = testElementContainer;
94:                 testElementContainer = newTestElementContainer;
95:•                if (eNotificationRequired()) {
96:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
97:                                 ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER, oldTestElementContainer,
98:                                 newTestElementContainer);
99:•                        if (msgs == null) {
100:                                 msgs = notification;
101:                         } else {
102:                                 msgs.add(notification);
103:                         }
104:                 }
105:                 return msgs;
106:         }
107:
108:         /**
109:          * <!-- begin-user-doc -->
110:          * <!-- end-user-doc -->
111:          *
112:          * @generated
113:          */
114:         @Override
115:         public void setTestElementContainer(TestElementContainer newTestElementContainer) {
116:•                if (newTestElementContainer != testElementContainer) {
117:                         NotificationChain msgs = null;
118:•                        if (testElementContainer != null) {
119:                                 msgs = ((InternalEObject) testElementContainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
120:                                         - ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER, null, msgs);
121:                         }
122:•                        if (newTestElementContainer != null) {
123:                                 msgs = ((InternalEObject) newTestElementContainer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
124:                                         - ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER, null, msgs);
125:                         }
126:                         msgs = basicSetTestElementContainer(newTestElementContainer, msgs);
127:•                        if (msgs != null) {
128:                                 msgs.dispatch();
129:                         }
130:•                } else if (eNotificationRequired()) {
131:                         eNotify(new ENotificationImpl(this, Notification.SET,
132:                                 ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER, newTestElementContainer,
133:                                 newTestElementContainer));
134:                 }
135:         }
136:
137:         /**
138:          * <!-- begin-user-doc -->
139:          * <!-- end-user-doc -->
140:          *
141:          * @generated
142:          */
143:         @Override
144:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
145:•                switch (featureID) {
146:                 case ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER:
147:                         return basicSetTestElementContainer(null, msgs);
148:                 }
149:                 return super.eInverseRemove(otherEnd, featureID, msgs);
150:         }
151:
152:         /**
153:          * <!-- begin-user-doc -->
154:          * <!-- end-user-doc -->
155:          *
156:          * @generated
157:          */
158:         @Override
159:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
160:•                switch (featureID) {
161:                 case ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER:
162:                         return getTestElementContainer();
163:                 }
164:                 return super.eGet(featureID, resolve, coreType);
165:         }
166:
167:         /**
168:          * <!-- begin-user-doc -->
169:          * <!-- end-user-doc -->
170:          *
171:          * @generated
172:          */
173:         @Override
174:         public void eSet(int featureID, Object newValue) {
175:•                switch (featureID) {
176:                 case ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER:
177:                         setTestElementContainer((TestElementContainer) newValue);
178:                         return;
179:                 }
180:                 super.eSet(featureID, newValue);
181:         }
182:
183:         /**
184:          * <!-- begin-user-doc -->
185:          * <!-- end-user-doc -->
186:          *
187:          * @generated
188:          */
189:         @Override
190:         public void eUnset(int featureID) {
191:•                switch (featureID) {
192:                 case ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER:
193:                         setTestElementContainer((TestElementContainer) null);
194:                         return;
195:                 }
196:                 super.eUnset(featureID);
197:         }
198:
199:         /**
200:          * <!-- begin-user-doc -->
201:          * <!-- end-user-doc -->
202:          *
203:          * @generated
204:          */
205:         @Override
206:         public boolean eIsSet(int featureID) {
207:•                switch (featureID) {
208:                 case ModelPackage.DOMAIN_INTERMEDIATE__TEST_ELEMENT_CONTAINER:
209:•                        return testElementContainer != null;
210:                 }
211:                 return super.eIsSet(featureID);
212:         }
213:
214: } // DomainIntermediateImpl