Skip to content

Package: SettingLocationImpl

SettingLocationImpl

nameinstructionbranchcomplexitylinemethod
SettingLocationImpl()
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%
basicGetEObject()
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%
basicGetFeature()
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%
eGet(int, boolean, boolean)
M: 24 C: 0
0%
M: 7 C: 0
0%
M: 5 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 20 C: 0
0%
M: 7 C: 0
0%
M: 5 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
eSet(int, Object)
M: 17 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 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: 14 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 7 C: 0
0%
M: 1 C: 0
0%
getEObject()
M: 27 C: 10
27%
M: 6 C: 2
25%
M: 4 C: 1
20%
M: 6 C: 2
25%
M: 0 C: 1
100%
getFeature()
M: 28 C: 10
26%
M: 6 C: 2
25%
M: 4 C: 1
20%
M: 6 C: 2
25%
M: 0 C: 1
100%
setEObject(EObject)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 2 C: 4
67%
M: 0 C: 1
100%
setFeature(EStructuralFeature)
M: 11 C: 10
48%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 2 C: 4
67%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2015 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.emfforms.spi.spreadsheet.core.error.model.impl;
15:
16: import org.eclipse.emf.common.notify.Notification;
17: import org.eclipse.emf.ecore.EClass;
18: import org.eclipse.emf.ecore.EObject;
19: import org.eclipse.emf.ecore.EStructuralFeature;
20: import org.eclipse.emf.ecore.InternalEObject;
21: import org.eclipse.emf.ecore.impl.ENotificationImpl;
22: import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
23: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.ErrorPackage;
24: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingLocation;
25:
26: /**
27: * <!-- begin-user-doc -->
28: * An implementation of the model object '<em><b>Setting Location</b></em>'.
29: * <!-- end-user-doc -->
30: * <p>
31: * The following features are implemented:
32: * </p>
33: * <ul>
34: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SettingLocationImpl#getEObject <em>EObject</em>
35: * }</li>
36: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SettingLocationImpl#getFeature <em>Feature</em>
37: * }</li>
38: * </ul>
39: *
40: * @generated
41: */
42: public class SettingLocationImpl extends MinimalEObjectImpl.Container implements SettingLocation {
43:         /**
44:          * The cached value of the '{@link #getEObject() <em>EObject</em>}' reference.
45:          * <!-- begin-user-doc -->
46:          * <!-- end-user-doc -->
47:          *
48:          * @see #getEObject()
49:          * @generated
50:          * @ordered
51:          */
52:         protected EObject eObject;
53:
54:         /**
55:          * The cached value of the '{@link #getFeature() <em>Feature</em>}' reference.
56:          * <!-- begin-user-doc -->
57:          * <!-- end-user-doc -->
58:          *
59:          * @see #getFeature()
60:          * @generated
61:          * @ordered
62:          */
63:         protected EStructuralFeature feature;
64:
65:         /**
66:          * <!-- begin-user-doc -->
67:          * <!-- end-user-doc -->
68:          *
69:          * @generated
70:          */
71:         protected SettingLocationImpl() {
72:                 super();
73:         }
74:
75:         /**
76:          * <!-- begin-user-doc -->
77:          * <!-- end-user-doc -->
78:          *
79:          * @generated
80:          */
81:         @Override
82:         protected EClass eStaticClass() {
83:                 return ErrorPackage.Literals.SETTING_LOCATION;
84:         }
85:
86:         /**
87:          * <!-- begin-user-doc -->
88:          * <!-- end-user-doc -->
89:          *
90:          * @generated
91:          */
92:         @Override
93:         public EObject getEObject() {
94:•                if (eObject != null && eObject.eIsProxy()) {
95:                         final InternalEObject oldEObject = (InternalEObject) eObject;
96:                         eObject = eResolveProxy(oldEObject);
97:•                        if (eObject != oldEObject) {
98:•                                if (eNotificationRequired()) {
99:                                         eNotify(new ENotificationImpl(this, Notification.RESOLVE, ErrorPackage.SETTING_LOCATION__EOBJECT,
100:                                                 oldEObject, eObject));
101:                                 }
102:                         }
103:                 }
104:                 return eObject;
105:         }
106:
107:         /**
108:          * <!-- begin-user-doc -->
109:          * <!-- end-user-doc -->
110:          *
111:          * @generated
112:          */
113:         public EObject basicGetEObject() {
114:                 return eObject;
115:         }
116:
117:         /**
118:          * <!-- begin-user-doc -->
119:          * <!-- end-user-doc -->
120:          *
121:          * @generated
122:          */
123:         @Override
124:         public void setEObject(EObject newEObject) {
125:                 final EObject oldEObject = eObject;
126:                 eObject = newEObject;
127:•                if (eNotificationRequired()) {
128:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.SETTING_LOCATION__EOBJECT, oldEObject,
129:                                 eObject));
130:                 }
131:         }
132:
133:         /**
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @generated
138:          */
139:         @Override
140:         public EStructuralFeature getFeature() {
141:•                if (feature != null && feature.eIsProxy()) {
142:                         final InternalEObject oldFeature = (InternalEObject) feature;
143:                         feature = (EStructuralFeature) eResolveProxy(oldFeature);
144:•                        if (feature != oldFeature) {
145:•                                if (eNotificationRequired()) {
146:                                         eNotify(new ENotificationImpl(this, Notification.RESOLVE, ErrorPackage.SETTING_LOCATION__FEATURE,
147:                                                 oldFeature, feature));
148:                                 }
149:                         }
150:                 }
151:                 return feature;
152:         }
153:
154:         /**
155:          * <!-- begin-user-doc -->
156:          * <!-- end-user-doc -->
157:          *
158:          * @generated
159:          */
160:         public EStructuralFeature basicGetFeature() {
161:                 return feature;
162:         }
163:
164:         /**
165:          * <!-- begin-user-doc -->
166:          * <!-- end-user-doc -->
167:          *
168:          * @generated
169:          */
170:         @Override
171:         public void setFeature(EStructuralFeature newFeature) {
172:                 final EStructuralFeature oldFeature = feature;
173:                 feature = newFeature;
174:•                if (eNotificationRequired()) {
175:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.SETTING_LOCATION__FEATURE, oldFeature,
176:                                 feature));
177:                 }
178:         }
179:
180:         /**
181:          * <!-- begin-user-doc -->
182:          * <!-- end-user-doc -->
183:          *
184:          * @generated
185:          */
186:         @Override
187:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
188:•                switch (featureID) {
189:                 case ErrorPackage.SETTING_LOCATION__EOBJECT:
190:•                        if (resolve) {
191:                                 return getEObject();
192:                         }
193:                         return basicGetEObject();
194:                 case ErrorPackage.SETTING_LOCATION__FEATURE:
195:•                        if (resolve) {
196:                                 return getFeature();
197:                         }
198:                         return basicGetFeature();
199:                 }
200:                 return super.eGet(featureID, resolve, coreType);
201:         }
202:
203:         /**
204:          * <!-- begin-user-doc -->
205:          * <!-- end-user-doc -->
206:          *
207:          * @generated
208:          */
209:         @Override
210:         public void eSet(int featureID, Object newValue) {
211:•                switch (featureID) {
212:                 case ErrorPackage.SETTING_LOCATION__EOBJECT:
213:                         setEObject((EObject) newValue);
214:                         return;
215:                 case ErrorPackage.SETTING_LOCATION__FEATURE:
216:                         setFeature((EStructuralFeature) newValue);
217:                         return;
218:                 }
219:                 super.eSet(featureID, newValue);
220:         }
221:
222:         /**
223:          * <!-- begin-user-doc -->
224:          * <!-- end-user-doc -->
225:          *
226:          * @generated
227:          */
228:         @Override
229:         public void eUnset(int featureID) {
230:•                switch (featureID) {
231:                 case ErrorPackage.SETTING_LOCATION__EOBJECT:
232:                         setEObject((EObject) null);
233:                         return;
234:                 case ErrorPackage.SETTING_LOCATION__FEATURE:
235:                         setFeature((EStructuralFeature) null);
236:                         return;
237:                 }
238:                 super.eUnset(featureID);
239:         }
240:
241:         /**
242:          * <!-- begin-user-doc -->
243:          * <!-- end-user-doc -->
244:          *
245:          * @generated
246:          */
247:         @Override
248:         public boolean eIsSet(int featureID) {
249:•                switch (featureID) {
250:                 case ErrorPackage.SETTING_LOCATION__EOBJECT:
251:•                        return eObject != null;
252:                 case ErrorPackage.SETTING_LOCATION__FEATURE:
253:•                        return feature != null;
254:                 }
255:                 return super.eIsSet(featureID);
256:         }
257:
258: } // SettingLocationImpl