Skip to content

Package: IntermediateImpl

IntermediateImpl

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