Skip to content

Package: RootImpl

RootImpl

nameinstructionbranchcomplexitylinemethod
RootImpl()
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%
basicSetIntermediate(Intermediate, 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%
getIntermediate()
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%
setIntermediate(Intermediate)
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: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.index.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.index.test.example.ExamplePackage;
23: import org.eclipse.emf.ecp.view.index.test.example.Intermediate;
24: import org.eclipse.emf.ecp.view.index.test.example.Root;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model object '<em><b>Root</b></em>'.
29: * <!-- end-user-doc -->
30: * <p>
31: * The following features are implemented:
32: * <ul>
33: * <li>{@link org.eclipse.emf.ecp.view.index.test.example.impl.RootImpl#getIntermediate <em>Intermediate</em>}</li>
34: * </ul>
35: * </p>
36: *
37: * @generated
38: */
39: public class RootImpl extends MinimalEObjectImpl.Container implements Root {
40:         /**
41:          * The cached value of the '{@link #getIntermediate() <em>Intermediate</em>}' containment reference.
42:          * <!-- begin-user-doc -->
43:          * <!-- end-user-doc -->
44:          *
45:          * @see #getIntermediate()
46:          * @generated
47:          * @ordered
48:          */
49:         protected Intermediate intermediate;
50:
51:         /**
52:          * <!-- begin-user-doc -->
53:          * <!-- end-user-doc -->
54:          *
55:          * @generated
56:          */
57:         protected RootImpl() {
58:                 super();
59:         }
60:
61:         /**
62:          * <!-- begin-user-doc -->
63:          * <!-- end-user-doc -->
64:          *
65:          * @generated
66:          */
67:         @Override
68:         protected EClass eStaticClass() {
69:                 return ExamplePackage.Literals.ROOT;
70:         }
71:
72:         /**
73:          * <!-- begin-user-doc -->
74:          * <!-- end-user-doc -->
75:          *
76:          * @generated
77:          */
78:         @Override
79:         public Intermediate getIntermediate() {
80:                 return intermediate;
81:         }
82:
83:         /**
84:          * <!-- begin-user-doc -->
85:          * <!-- end-user-doc -->
86:          *
87:          * @generated
88:          */
89:         public NotificationChain basicSetIntermediate(Intermediate newIntermediate, NotificationChain msgs) {
90:                 final Intermediate oldIntermediate = intermediate;
91:                 intermediate = newIntermediate;
92:•                if (eNotificationRequired()) {
93:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
94:                                 ExamplePackage.ROOT__INTERMEDIATE, oldIntermediate, newIntermediate);
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 setIntermediate(Intermediate newIntermediate) {
112:•                if (newIntermediate != intermediate) {
113:                         NotificationChain msgs = null;
114:•                        if (intermediate != null) {
115:                                 msgs = ((InternalEObject) intermediate).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
116:                                         - ExamplePackage.ROOT__INTERMEDIATE, null, msgs);
117:                         }
118:•                        if (newIntermediate != null) {
119:                                 msgs = ((InternalEObject) newIntermediate).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
120:                                         - ExamplePackage.ROOT__INTERMEDIATE, null, msgs);
121:                         }
122:                         msgs = basicSetIntermediate(newIntermediate, msgs);
123:•                        if (msgs != null) {
124:                                 msgs.dispatch();
125:                         }
126:•                } else if (eNotificationRequired()) {
127:                         eNotify(new ENotificationImpl(this, Notification.SET, ExamplePackage.ROOT__INTERMEDIATE, newIntermediate,
128:                                 newIntermediate));
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.ROOT__INTERMEDIATE:
142:                         return basicSetIntermediate(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.ROOT__INTERMEDIATE:
157:                         return getIntermediate();
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.ROOT__INTERMEDIATE:
172:                         setIntermediate((Intermediate) 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.ROOT__INTERMEDIATE:
188:                         setIntermediate((Intermediate) 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.ROOT__INTERMEDIATE:
204:•                        return intermediate != null;
205:                 }
206:                 return super.eIsSet(featureID);
207:         }
208:
209: } // RootImpl