Skip to content

Package: SettingToSheetMappingImpl

SettingToSheetMappingImpl

nameinstructionbranchcomplexitylinemethod
SettingToSheetMappingImpl()
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%
basicSetSettingLocation(SettingLocation, NotificationChain)
M: 18 C: 11
38%
M: 3 C: 1
25%
M: 2 C: 1
33%
M: 6 C: 4
40%
M: 0 C: 1
100%
basicSetSheetLocation(SheetLocation, NotificationChain)
M: 18 C: 11
38%
M: 3 C: 1
25%
M: 2 C: 1
33%
M: 6 C: 4
40%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 14 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 18 C: 0
0%
M: 3 C: 0
0%
M: 3 C: 0
0%
M: 4 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%
getSettingLocation()
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%
getSheetLocation()
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%
setSettingLocation(SettingLocation)
M: 25 C: 27
52%
M: 6 C: 4
40%
M: 5 C: 1
17%
M: 6 C: 9
60%
M: 0 C: 1
100%
setSheetLocation(SheetLocation)
M: 25 C: 27
52%
M: 6 C: 4
40%
M: 5 C: 1
17%
M: 6 C: 9
60%
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.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.emfforms.spi.spreadsheet.core.error.model.ErrorPackage;
23: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingLocation;
24: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SettingToSheetMapping;
25: import org.eclipse.emfforms.spi.spreadsheet.core.error.model.SheetLocation;
26:
27: /**
28: * <!-- begin-user-doc -->
29: * An implementation of the model object '<em><b>Setting To Sheet Mapping</b></em>'.
30: * <!-- end-user-doc -->
31: * <p>
32: * The following features are implemented:
33: * </p>
34: * <ul>
35: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SettingToSheetMappingImpl#getSheetLocation
36: * <em>Sheet Location</em>}</li>
37: * <li>{@link org.eclipse.emfforms.spi.spreadsheet.core.error.model.impl.SettingToSheetMappingImpl#getSettingLocation
38: * <em>Setting Location</em>}</li>
39: * </ul>
40: *
41: * @generated
42: */
43: public class SettingToSheetMappingImpl extends MinimalEObjectImpl.Container implements SettingToSheetMapping {
44:         /**
45:          * The cached value of the '{@link #getSheetLocation() <em>Sheet Location</em>}' containment reference.
46:          * <!-- begin-user-doc -->
47:          * <!-- end-user-doc -->
48:          *
49:          * @see #getSheetLocation()
50:          * @generated
51:          * @ordered
52:          */
53:         protected SheetLocation sheetLocation;
54:
55:         /**
56:          * The cached value of the '{@link #getSettingLocation() <em>Setting Location</em>}' containment reference.
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @see #getSettingLocation()
61:          * @generated
62:          * @ordered
63:          */
64:         protected SettingLocation settingLocation;
65:
66:         /**
67:          * <!-- begin-user-doc -->
68:          * <!-- end-user-doc -->
69:          *
70:          * @generated
71:          */
72:         protected SettingToSheetMappingImpl() {
73:                 super();
74:         }
75:
76:         /**
77:          * <!-- begin-user-doc -->
78:          * <!-- end-user-doc -->
79:          *
80:          * @generated
81:          */
82:         @Override
83:         protected EClass eStaticClass() {
84:                 return ErrorPackage.Literals.SETTING_TO_SHEET_MAPPING;
85:         }
86:
87:         /**
88:          * <!-- begin-user-doc -->
89:          * <!-- end-user-doc -->
90:          *
91:          * @generated
92:          */
93:         @Override
94:         public SheetLocation getSheetLocation() {
95:                 return sheetLocation;
96:         }
97:
98:         /**
99:          * <!-- begin-user-doc -->
100:          * <!-- end-user-doc -->
101:          *
102:          * @generated
103:          */
104:         public NotificationChain basicSetSheetLocation(SheetLocation newSheetLocation, NotificationChain msgs) {
105:                 final SheetLocation oldSheetLocation = sheetLocation;
106:                 sheetLocation = newSheetLocation;
107:•                if (eNotificationRequired()) {
108:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
109:                                 ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION, oldSheetLocation, newSheetLocation);
110:•                        if (msgs == null) {
111:                                 msgs = notification;
112:                         } else {
113:                                 msgs.add(notification);
114:                         }
115:                 }
116:                 return msgs;
117:         }
118:
119:         /**
120:          * <!-- begin-user-doc -->
121:          * <!-- end-user-doc -->
122:          *
123:          * @generated
124:          */
125:         @Override
126:         public void setSheetLocation(SheetLocation newSheetLocation) {
127:•                if (newSheetLocation != sheetLocation) {
128:                         NotificationChain msgs = null;
129:•                        if (sheetLocation != null) {
130:                                 msgs = ((InternalEObject) sheetLocation).eInverseRemove(this,
131:                                         EOPPOSITE_FEATURE_BASE - ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION, null, msgs);
132:                         }
133:•                        if (newSheetLocation != null) {
134:                                 msgs = ((InternalEObject) newSheetLocation).eInverseAdd(this,
135:                                         EOPPOSITE_FEATURE_BASE - ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION, null, msgs);
136:                         }
137:                         msgs = basicSetSheetLocation(newSheetLocation, msgs);
138:•                        if (msgs != null) {
139:                                 msgs.dispatch();
140:                         }
141:•                } else if (eNotificationRequired()) {
142:                         eNotify(new ENotificationImpl(this, Notification.SET, ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION,
143:                                 newSheetLocation, newSheetLocation));
144:                 }
145:         }
146:
147:         /**
148:          * <!-- begin-user-doc -->
149:          * <!-- end-user-doc -->
150:          *
151:          * @generated
152:          */
153:         @Override
154:         public SettingLocation getSettingLocation() {
155:                 return settingLocation;
156:         }
157:
158:         /**
159:          * <!-- begin-user-doc -->
160:          * <!-- end-user-doc -->
161:          *
162:          * @generated
163:          */
164:         public NotificationChain basicSetSettingLocation(SettingLocation newSettingLocation, NotificationChain msgs) {
165:                 final SettingLocation oldSettingLocation = settingLocation;
166:                 settingLocation = newSettingLocation;
167:•                if (eNotificationRequired()) {
168:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
169:                                 ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION, oldSettingLocation, newSettingLocation);
170:•                        if (msgs == null) {
171:                                 msgs = notification;
172:                         } else {
173:                                 msgs.add(notification);
174:                         }
175:                 }
176:                 return msgs;
177:         }
178:
179:         /**
180:          * <!-- begin-user-doc -->
181:          * <!-- end-user-doc -->
182:          *
183:          * @generated
184:          */
185:         @Override
186:         public void setSettingLocation(SettingLocation newSettingLocation) {
187:•                if (newSettingLocation != settingLocation) {
188:                         NotificationChain msgs = null;
189:•                        if (settingLocation != null) {
190:                                 msgs = ((InternalEObject) settingLocation).eInverseRemove(this,
191:                                         EOPPOSITE_FEATURE_BASE - ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION, null, msgs);
192:                         }
193:•                        if (newSettingLocation != null) {
194:                                 msgs = ((InternalEObject) newSettingLocation).eInverseAdd(this,
195:                                         EOPPOSITE_FEATURE_BASE - ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION, null, msgs);
196:                         }
197:                         msgs = basicSetSettingLocation(newSettingLocation, msgs);
198:•                        if (msgs != null) {
199:                                 msgs.dispatch();
200:                         }
201:•                } else if (eNotificationRequired()) {
202:                         eNotify(new ENotificationImpl(this, Notification.SET,
203:                                 ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION, newSettingLocation, newSettingLocation));
204:                 }
205:         }
206:
207:         /**
208:          * <!-- begin-user-doc -->
209:          * <!-- end-user-doc -->
210:          *
211:          * @generated
212:          */
213:         @Override
214:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
215:•                switch (featureID) {
216:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION:
217:                         return basicSetSheetLocation(null, msgs);
218:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION:
219:                         return basicSetSettingLocation(null, msgs);
220:                 }
221:                 return super.eInverseRemove(otherEnd, featureID, msgs);
222:         }
223:
224:         /**
225:          * <!-- begin-user-doc -->
226:          * <!-- end-user-doc -->
227:          *
228:          * @generated
229:          */
230:         @Override
231:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
232:•                switch (featureID) {
233:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION:
234:                         return getSheetLocation();
235:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION:
236:                         return getSettingLocation();
237:                 }
238:                 return super.eGet(featureID, resolve, coreType);
239:         }
240:
241:         /**
242:          * <!-- begin-user-doc -->
243:          * <!-- end-user-doc -->
244:          *
245:          * @generated
246:          */
247:         @Override
248:         public void eSet(int featureID, Object newValue) {
249:•                switch (featureID) {
250:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION:
251:                         setSheetLocation((SheetLocation) newValue);
252:                         return;
253:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION:
254:                         setSettingLocation((SettingLocation) newValue);
255:                         return;
256:                 }
257:                 super.eSet(featureID, newValue);
258:         }
259:
260:         /**
261:          * <!-- begin-user-doc -->
262:          * <!-- end-user-doc -->
263:          *
264:          * @generated
265:          */
266:         @Override
267:         public void eUnset(int featureID) {
268:•                switch (featureID) {
269:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION:
270:                         setSheetLocation((SheetLocation) null);
271:                         return;
272:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION:
273:                         setSettingLocation((SettingLocation) null);
274:                         return;
275:                 }
276:                 super.eUnset(featureID);
277:         }
278:
279:         /**
280:          * <!-- begin-user-doc -->
281:          * <!-- end-user-doc -->
282:          *
283:          * @generated
284:          */
285:         @Override
286:         public boolean eIsSet(int featureID) {
287:•                switch (featureID) {
288:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SHEET_LOCATION:
289:•                        return sheetLocation != null;
290:                 case ErrorPackage.SETTING_TO_SHEET_MAPPING__SETTING_LOCATION:
291:•                        return settingLocation != null;
292:                 }
293:                 return super.eIsSet(featureID);
294:         }
295:
296: } // SettingToSheetMappingImpl