Skip to content

Package: BaseImpl

BaseImpl

nameinstructionbranchcomplexitylinemethod
BaseImpl()
M: 0 C: 9
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 4
100%
M: 0 C: 1
100%
basicSetChild(Base, NotificationChain)
M: 4 C: 25
86%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 1 C: 10
91%
M: 0 C: 1
100%
basicSetChildUnsettable(Base, NotificationChain)
M: 40 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 12 C: 0
0%
M: 1 C: 0
0%
basicSetChildrenUnsettable(Base, NotificationChain)
M: 40 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 13 C: 0
0%
M: 1 C: 0
0%
basicUnsetChildUnsettable(NotificationChain)
M: 36 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 12 C: 0
0%
M: 1 C: 0
0%
basicUnsetChildrenUnsettable(NotificationChain)
M: 36 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 12 C: 0
0%
M: 1 C: 0
0%
eGet(int, boolean, boolean)
M: 21 C: 11
34%
M: 6 C: 3
33%
M: 6 C: 3
33%
M: 6 C: 4
40%
M: 0 C: 1
100%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 28 C: 0
0%
M: 5 C: 0
0%
M: 5 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 41 C: 24
37%
M: 16 C: 9
36%
M: 11 C: 6
35%
M: 6 C: 5
45%
M: 0 C: 1
100%
eSet(int, Object)
M: 62 C: 0
0%
M: 9 C: 0
0%
M: 9 C: 0
0%
M: 22 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: 34 C: 0
0%
M: 9 C: 0
0%
M: 9 C: 0
0%
M: 19 C: 0
0%
M: 1 C: 0
0%
getChild()
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%
getChildUnsettable()
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%
getChildren()
M: 0 C: 14
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
getChildrenUnsettable()
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%
getMultiAttribute()
M: 14 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getMultiAttributeUnsettable()
M: 14 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getSingleAttribute()
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%
getSingleAttributeUnsettable()
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%
isSetChildUnsettable()
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%
isSetChildrenUnsettable()
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%
isSetMultiAttributeUnsettable()
M: 12 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isSetSingleAttributeUnsettable()
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%
setChild(Base)
M: 13 C: 39
75%
M: 3 C: 7
70%
M: 2 C: 4
67%
M: 1 C: 13
93%
M: 0 C: 1
100%
setChildUnsettable(Base)
M: 63 C: 0
0%
M: 12 C: 0
0%
M: 7 C: 0
0%
M: 18 C: 0
0%
M: 1 C: 0
0%
setChildrenUnsettable(Base)
M: 63 C: 0
0%
M: 12 C: 0
0%
M: 7 C: 0
0%
M: 18 C: 0
0%
M: 1 C: 0
0%
setSingleAttribute(String)
M: 0 C: 21
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 6
100%
M: 0 C: 1
100%
setSingleAttributeUnsettable(String)
M: 2 C: 30
94%
M: 1 C: 3
75%
M: 1 C: 2
67%
M: 0 C: 8
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 5
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
toString()
M: 63 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 16 C: 0
0%
M: 1 C: 0
0%
unsetChildUnsettable()
M: 44 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 14 C: 0
0%
M: 1 C: 0
0%
unsetChildrenUnsettable()
M: 44 C: 0
0%
M: 6 C: 0
0%
M: 4 C: 0
0%
M: 14 C: 0
0%
M: 1 C: 0
0%
unsetMultiAttributeUnsettable()
M: 8 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
unsetSingleAttributeUnsettable()
M: 0 C: 27
100%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 0 C: 8
100%
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.emf.ecp.common.test.model.impl;
15:
16: import java.util.Collection;
17:
18: import org.eclipse.emf.common.notify.Notification;
19: import org.eclipse.emf.common.notify.NotificationChain;
20: import org.eclipse.emf.common.util.EList;
21: import org.eclipse.emf.ecore.EClass;
22: import org.eclipse.emf.ecore.InternalEObject;
23: import org.eclipse.emf.ecore.impl.ENotificationImpl;
24: import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
25: import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
26: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
27: import org.eclipse.emf.ecore.util.InternalEList;
28: import org.eclipse.emf.ecp.common.test.model.Base;
29: import org.eclipse.emf.ecp.common.test.model.TestPackage;
30:
31: /**
32: * <!-- begin-user-doc -->
33: * An implementation of the model object '<em><b>Base</b></em>'.
34: * <!-- end-user-doc -->
35: * <p>
36: * The following features are implemented:
37: * </p>
38: * <ul>
39: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getSingleAttribute <em>Single Attribute</em>}</li>
40: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getSingleAttributeUnsettable
41: * <em>Single Attribute Unsettable</em>}</li>
42: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getMultiAttribute <em>Multi Attribute</em>}</li>
43: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getMultiAttributeUnsettable
44: * <em>Multi Attribute Unsettable</em>}</li>
45: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getChild <em>Child</em>}</li>
46: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getChildUnsettable <em>Child Unsettable</em>}</li>
47: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getChildren <em>Children</em>}</li>
48: * <li>{@link org.eclipse.emf.ecp.common.test.model.impl.BaseImpl#getChildrenUnsettable <em>Children Unsettable</em>}
49: * </li>
50: * </ul>
51: *
52: * @generated
53: */
54: public class BaseImpl extends MinimalEObjectImpl.Container implements Base {
55:         /**
56:          * The default value of the '{@link #getSingleAttribute() <em>Single Attribute</em>}' attribute.
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @see #getSingleAttribute()
61:          * @generated
62:          * @ordered
63:          */
64:         protected static final String SINGLE_ATTRIBUTE_EDEFAULT = null;
65:
66:         /**
67:          * The cached value of the '{@link #getSingleAttribute() <em>Single Attribute</em>}' attribute.
68:          * <!-- begin-user-doc -->
69:          * <!-- end-user-doc -->
70:          *
71:          * @see #getSingleAttribute()
72:          * @generated
73:          * @ordered
74:          */
75:         protected String singleAttribute = SINGLE_ATTRIBUTE_EDEFAULT;
76:
77:         /**
78:          * The default value of the '{@link #getSingleAttributeUnsettable() <em>Single Attribute Unsettable</em>}'
79:          * attribute.
80:          * <!-- begin-user-doc -->
81:          * <!-- end-user-doc -->
82:          *
83:          * @see #getSingleAttributeUnsettable()
84:          * @generated
85:          * @ordered
86:          */
87:         protected static final String SINGLE_ATTRIBUTE_UNSETTABLE_EDEFAULT = null;
88:
89:         /**
90:          * The cached value of the '{@link #getSingleAttributeUnsettable() <em>Single Attribute Unsettable</em>}' attribute.
91:          * <!-- begin-user-doc -->
92:          * <!-- end-user-doc -->
93:          *
94:          * @see #getSingleAttributeUnsettable()
95:          * @generated
96:          * @ordered
97:          */
98:         protected String singleAttributeUnsettable = SINGLE_ATTRIBUTE_UNSETTABLE_EDEFAULT;
99:
100:         /**
101:          * This is true if the Single Attribute Unsettable attribute has been set.
102:          * <!-- begin-user-doc -->
103:          * <!-- end-user-doc -->
104:          *
105:          * @generated
106:          * @ordered
107:          */
108:         protected boolean singleAttributeUnsettableESet;
109:
110:         /**
111:          * The cached value of the '{@link #getMultiAttribute() <em>Multi Attribute</em>}' attribute list.
112:          * <!-- begin-user-doc -->
113:          * <!-- end-user-doc -->
114:          *
115:          * @see #getMultiAttribute()
116:          * @generated
117:          * @ordered
118:          */
119:         protected EList<String> multiAttribute;
120:
121:         /**
122:          * The cached value of the '{@link #getMultiAttributeUnsettable() <em>Multi Attribute Unsettable</em>}' attribute
123:          * list.
124:          * <!-- begin-user-doc -->
125:          * <!-- end-user-doc -->
126:          *
127:          * @see #getMultiAttributeUnsettable()
128:          * @generated
129:          * @ordered
130:          */
131:         protected EList<String> multiAttributeUnsettable;
132:
133:         /**
134:          * The cached value of the '{@link #getChild() <em>Child</em>}' containment reference.
135:          * <!-- begin-user-doc -->
136:          * <!-- end-user-doc -->
137:          *
138:          * @see #getChild()
139:          * @generated
140:          * @ordered
141:          */
142:         protected Base child;
143:
144:         /**
145:          * The cached value of the '{@link #getChildUnsettable() <em>Child Unsettable</em>}' containment reference.
146:          * <!-- begin-user-doc -->
147:          * <!-- end-user-doc -->
148:          *
149:          * @see #getChildUnsettable()
150:          * @generated
151:          * @ordered
152:          */
153:         protected Base childUnsettable;
154:
155:         /**
156:          * This is true if the Child Unsettable containment reference has been set.
157:          * <!-- begin-user-doc -->
158:          * <!-- end-user-doc -->
159:          *
160:          * @generated
161:          * @ordered
162:          */
163:         protected boolean childUnsettableESet;
164:
165:         /**
166:          * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
167:          * <!-- begin-user-doc -->
168:          * <!-- end-user-doc -->
169:          *
170:          * @see #getChildren()
171:          * @generated
172:          * @ordered
173:          */
174:         protected EList<Base> children;
175:
176:         /**
177:          * The cached value of the '{@link #getChildrenUnsettable() <em>Children Unsettable</em>}' containment reference.
178:          * <!-- begin-user-doc -->
179:          * <!-- end-user-doc -->
180:          *
181:          * @see #getChildrenUnsettable()
182:          * @generated
183:          * @ordered
184:          */
185:         protected Base childrenUnsettable;
186:
187:         /**
188:          * This is true if the Children Unsettable containment reference has been set.
189:          * <!-- begin-user-doc -->
190:          * <!-- end-user-doc -->
191:          *
192:          * @generated
193:          * @ordered
194:          */
195:         protected boolean childrenUnsettableESet;
196:
197:         /**
198:          * <!-- begin-user-doc -->
199:          * <!-- end-user-doc -->
200:          *
201:          * @generated
202:          */
203:         protected BaseImpl() {
204:                 super();
205:         }
206:
207:         /**
208:          * <!-- begin-user-doc -->
209:          * <!-- end-user-doc -->
210:          *
211:          * @generated
212:          */
213:         @Override
214:         protected EClass eStaticClass() {
215:                 return TestPackage.Literals.BASE;
216:         }
217:
218:         /**
219:          * <!-- begin-user-doc -->
220:          * <!-- end-user-doc -->
221:          *
222:          * @generated
223:          */
224:         @Override
225:         public String getSingleAttribute() {
226:                 return singleAttribute;
227:         }
228:
229:         /**
230:          * <!-- begin-user-doc -->
231:          * <!-- end-user-doc -->
232:          *
233:          * @generated
234:          */
235:         @Override
236:         public void setSingleAttribute(String newSingleAttribute) {
237:                 final String oldSingleAttribute = singleAttribute;
238:                 singleAttribute = newSingleAttribute;
239:•                if (eNotificationRequired()) {
240:                         eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.BASE__SINGLE_ATTRIBUTE,
241:                                 oldSingleAttribute, singleAttribute));
242:                 }
243:         }
244:
245:         /**
246:          * <!-- begin-user-doc -->
247:          * <!-- end-user-doc -->
248:          *
249:          * @generated
250:          */
251:         @Override
252:         public String getSingleAttributeUnsettable() {
253:                 return singleAttributeUnsettable;
254:         }
255:
256:         /**
257:          * <!-- begin-user-doc -->
258:          * <!-- end-user-doc -->
259:          *
260:          * @generated
261:          */
262:         @Override
263:         public void setSingleAttributeUnsettable(String newSingleAttributeUnsettable) {
264:                 final String oldSingleAttributeUnsettable = singleAttributeUnsettable;
265:                 singleAttributeUnsettable = newSingleAttributeUnsettable;
266:                 final boolean oldSingleAttributeUnsettableESet = singleAttributeUnsettableESet;
267:                 singleAttributeUnsettableESet = true;
268:•                if (eNotificationRequired()) {
269:                         eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.BASE__SINGLE_ATTRIBUTE_UNSETTABLE,
270:•                                oldSingleAttributeUnsettable, singleAttributeUnsettable, !oldSingleAttributeUnsettableESet));
271:                 }
272:         }
273:
274:         /**
275:          * <!-- begin-user-doc -->
276:          * <!-- end-user-doc -->
277:          *
278:          * @generated
279:          */
280:         @Override
281:         public void unsetSingleAttributeUnsettable() {
282:                 final String oldSingleAttributeUnsettable = singleAttributeUnsettable;
283:                 final boolean oldSingleAttributeUnsettableESet = singleAttributeUnsettableESet;
284:                 singleAttributeUnsettable = SINGLE_ATTRIBUTE_UNSETTABLE_EDEFAULT;
285:                 singleAttributeUnsettableESet = false;
286:•                if (eNotificationRequired()) {
287:                         eNotify(new ENotificationImpl(this, Notification.UNSET, TestPackage.BASE__SINGLE_ATTRIBUTE_UNSETTABLE,
288:                                 oldSingleAttributeUnsettable, SINGLE_ATTRIBUTE_UNSETTABLE_EDEFAULT, oldSingleAttributeUnsettableESet));
289:                 }
290:         }
291:
292:         /**
293:          * <!-- begin-user-doc -->
294:          * <!-- end-user-doc -->
295:          *
296:          * @generated
297:          */
298:         @Override
299:         public boolean isSetSingleAttributeUnsettable() {
300:                 return singleAttributeUnsettableESet;
301:         }
302:
303:         /**
304:          * <!-- begin-user-doc -->
305:          * <!-- end-user-doc -->
306:          *
307:          * @generated
308:          */
309:         @Override
310:         public EList<String> getMultiAttribute() {
311:•                if (multiAttribute == null) {
312:                         multiAttribute = new EDataTypeUniqueEList<String>(String.class, this, TestPackage.BASE__MULTI_ATTRIBUTE);
313:                 }
314:                 return multiAttribute;
315:         }
316:
317:         /**
318:          * <!-- begin-user-doc -->
319:          * <!-- end-user-doc -->
320:          *
321:          * @generated
322:          */
323:         @Override
324:         public EList<String> getMultiAttributeUnsettable() {
325:•                if (multiAttributeUnsettable == null) {
326:                         multiAttributeUnsettable = new EDataTypeUniqueEList.Unsettable<String>(String.class, this,
327:                                 TestPackage.BASE__MULTI_ATTRIBUTE_UNSETTABLE);
328:                 }
329:                 return multiAttributeUnsettable;
330:         }
331:
332:         /**
333:          * <!-- begin-user-doc -->
334:          * <!-- end-user-doc -->
335:          *
336:          * @generated
337:          */
338:         @Override
339:         public void unsetMultiAttributeUnsettable() {
340:•                if (multiAttributeUnsettable != null) {
341:                         ((InternalEList.Unsettable<?>) multiAttributeUnsettable).unset();
342:                 }
343:         }
344:
345:         /**
346:          * <!-- begin-user-doc -->
347:          * <!-- end-user-doc -->
348:          *
349:          * @generated
350:          */
351:         @Override
352:         public boolean isSetMultiAttributeUnsettable() {
353:•                return multiAttributeUnsettable != null && ((InternalEList.Unsettable<?>) multiAttributeUnsettable).isSet();
354:         }
355:
356:         /**
357:          * <!-- begin-user-doc -->
358:          * <!-- end-user-doc -->
359:          *
360:          * @generated
361:          */
362:         @Override
363:         public Base getChild() {
364:                 return child;
365:         }
366:
367:         /**
368:          * <!-- begin-user-doc -->
369:          * <!-- end-user-doc -->
370:          *
371:          * @generated
372:          */
373:         public NotificationChain basicSetChild(Base newChild, NotificationChain msgs) {
374:                 final Base oldChild = child;
375:                 child = newChild;
376:•                if (eNotificationRequired()) {
377:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
378:                                 TestPackage.BASE__CHILD,
379:                                 oldChild, newChild);
380:•                        if (msgs == null) {
381:                                 msgs = notification;
382:                         } else {
383:                                 msgs.add(notification);
384:                         }
385:                 }
386:                 return msgs;
387:         }
388:
389:         /**
390:          * <!-- begin-user-doc -->
391:          * <!-- end-user-doc -->
392:          *
393:          * @generated
394:          */
395:         @Override
396:         public void setChild(Base newChild) {
397:•                if (newChild != child) {
398:                         NotificationChain msgs = null;
399:•                        if (child != null) {
400:                                 msgs = ((InternalEObject) child).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILD,
401:                                         null, msgs);
402:                         }
403:•                        if (newChild != null) {
404:                                 msgs = ((InternalEObject) newChild).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILD,
405:                                         null, msgs);
406:                         }
407:                         msgs = basicSetChild(newChild, msgs);
408:•                        if (msgs != null) {
409:                                 msgs.dispatch();
410:                         }
411:•                } else if (eNotificationRequired()) {
412:                         eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.BASE__CHILD, newChild, newChild));
413:                 }
414:         }
415:
416:         /**
417:          * <!-- begin-user-doc -->
418:          * <!-- end-user-doc -->
419:          *
420:          * @generated
421:          */
422:         @Override
423:         public Base getChildUnsettable() {
424:                 return childUnsettable;
425:         }
426:
427:         /**
428:          * <!-- begin-user-doc -->
429:          * <!-- end-user-doc -->
430:          *
431:          * @generated
432:          */
433:         public NotificationChain basicSetChildUnsettable(Base newChildUnsettable, NotificationChain msgs) {
434:                 final Base oldChildUnsettable = childUnsettable;
435:                 childUnsettable = newChildUnsettable;
436:                 final boolean oldChildUnsettableESet = childUnsettableESet;
437:                 childUnsettableESet = true;
438:•                if (eNotificationRequired()) {
439:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
440:•                                TestPackage.BASE__CHILD_UNSETTABLE, oldChildUnsettable, newChildUnsettable, !oldChildUnsettableESet);
441:•                        if (msgs == null) {
442:                                 msgs = notification;
443:                         } else {
444:                                 msgs.add(notification);
445:                         }
446:                 }
447:                 return msgs;
448:         }
449:
450:         /**
451:          * <!-- begin-user-doc -->
452:          * <!-- end-user-doc -->
453:          *
454:          * @generated
455:          */
456:         @Override
457:         public void setChildUnsettable(Base newChildUnsettable) {
458:•                if (newChildUnsettable != childUnsettable) {
459:                         NotificationChain msgs = null;
460:•                        if (childUnsettable != null) {
461:                                 msgs = ((InternalEObject) childUnsettable).eInverseRemove(this,
462:                                         EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILD_UNSETTABLE, null, msgs);
463:                         }
464:•                        if (newChildUnsettable != null) {
465:                                 msgs = ((InternalEObject) newChildUnsettable).eInverseAdd(this,
466:                                         EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILD_UNSETTABLE, null, msgs);
467:                         }
468:                         msgs = basicSetChildUnsettable(newChildUnsettable, msgs);
469:•                        if (msgs != null) {
470:                                 msgs.dispatch();
471:                         }
472:                 } else {
473:                         final boolean oldChildUnsettableESet = childUnsettableESet;
474:                         childUnsettableESet = true;
475:•                        if (eNotificationRequired()) {
476:                                 eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.BASE__CHILD_UNSETTABLE,
477:•                                        newChildUnsettable, newChildUnsettable, !oldChildUnsettableESet));
478:                         }
479:                 }
480:         }
481:
482:         /**
483:          * <!-- begin-user-doc -->
484:          * <!-- end-user-doc -->
485:          *
486:          * @generated
487:          */
488:         public NotificationChain basicUnsetChildUnsettable(NotificationChain msgs) {
489:                 final Base oldChildUnsettable = childUnsettable;
490:                 childUnsettable = null;
491:                 final boolean oldChildUnsettableESet = childUnsettableESet;
492:                 childUnsettableESet = false;
493:•                if (eNotificationRequired()) {
494:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET,
495:                                 TestPackage.BASE__CHILD_UNSETTABLE, oldChildUnsettable, null, oldChildUnsettableESet);
496:•                        if (msgs == null) {
497:                                 msgs = notification;
498:                         } else {
499:                                 msgs.add(notification);
500:                         }
501:                 }
502:                 return msgs;
503:         }
504:
505:         /**
506:          * <!-- begin-user-doc -->
507:          * <!-- end-user-doc -->
508:          *
509:          * @generated
510:          */
511:         @Override
512:         public void unsetChildUnsettable() {
513:•                if (childUnsettable != null) {
514:                         NotificationChain msgs = null;
515:                         msgs = ((InternalEObject) childUnsettable).eInverseRemove(this,
516:                                 EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILD_UNSETTABLE, null, msgs);
517:                         msgs = basicUnsetChildUnsettable(msgs);
518:•                        if (msgs != null) {
519:                                 msgs.dispatch();
520:                         }
521:                 } else {
522:                         final boolean oldChildUnsettableESet = childUnsettableESet;
523:                         childUnsettableESet = false;
524:•                        if (eNotificationRequired()) {
525:                                 eNotify(new ENotificationImpl(this, Notification.UNSET, TestPackage.BASE__CHILD_UNSETTABLE, null, null,
526:                                         oldChildUnsettableESet));
527:                         }
528:                 }
529:         }
530:
531:         /**
532:          * <!-- begin-user-doc -->
533:          * <!-- end-user-doc -->
534:          *
535:          * @generated
536:          */
537:         @Override
538:         public boolean isSetChildUnsettable() {
539:                 return childUnsettableESet;
540:         }
541:
542:         /**
543:          * <!-- begin-user-doc -->
544:          * <!-- end-user-doc -->
545:          *
546:          * @generated
547:          */
548:         @Override
549:         public EList<Base> getChildren() {
550:•                if (children == null) {
551:                         children = new EObjectContainmentEList<Base>(Base.class, this, TestPackage.BASE__CHILDREN);
552:                 }
553:                 return children;
554:         }
555:
556:         /**
557:          * <!-- begin-user-doc -->
558:          * <!-- end-user-doc -->
559:          *
560:          * @generated
561:          */
562:         @Override
563:         public Base getChildrenUnsettable() {
564:                 return childrenUnsettable;
565:         }
566:
567:         /**
568:          * <!-- begin-user-doc -->
569:          * <!-- end-user-doc -->
570:          *
571:          * @generated
572:          */
573:         public NotificationChain basicSetChildrenUnsettable(Base newChildrenUnsettable, NotificationChain msgs) {
574:                 final Base oldChildrenUnsettable = childrenUnsettable;
575:                 childrenUnsettable = newChildrenUnsettable;
576:                 final boolean oldChildrenUnsettableESet = childrenUnsettableESet;
577:                 childrenUnsettableESet = true;
578:•                if (eNotificationRequired()) {
579:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
580:                                 TestPackage.BASE__CHILDREN_UNSETTABLE, oldChildrenUnsettable, newChildrenUnsettable,
581:•                                !oldChildrenUnsettableESet);
582:•                        if (msgs == null) {
583:                                 msgs = notification;
584:                         } else {
585:                                 msgs.add(notification);
586:                         }
587:                 }
588:                 return msgs;
589:         }
590:
591:         /**
592:          * <!-- begin-user-doc -->
593:          * <!-- end-user-doc -->
594:          *
595:          * @generated
596:          */
597:         @Override
598:         public void setChildrenUnsettable(Base newChildrenUnsettable) {
599:•                if (newChildrenUnsettable != childrenUnsettable) {
600:                         NotificationChain msgs = null;
601:•                        if (childrenUnsettable != null) {
602:                                 msgs = ((InternalEObject) childrenUnsettable).eInverseRemove(this,
603:                                         EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILDREN_UNSETTABLE, null, msgs);
604:                         }
605:•                        if (newChildrenUnsettable != null) {
606:                                 msgs = ((InternalEObject) newChildrenUnsettable).eInverseAdd(this,
607:                                         EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILDREN_UNSETTABLE, null, msgs);
608:                         }
609:                         msgs = basicSetChildrenUnsettable(newChildrenUnsettable, msgs);
610:•                        if (msgs != null) {
611:                                 msgs.dispatch();
612:                         }
613:                 } else {
614:                         final boolean oldChildrenUnsettableESet = childrenUnsettableESet;
615:                         childrenUnsettableESet = true;
616:•                        if (eNotificationRequired()) {
617:                                 eNotify(new ENotificationImpl(this, Notification.SET, TestPackage.BASE__CHILDREN_UNSETTABLE,
618:•                                        newChildrenUnsettable, newChildrenUnsettable, !oldChildrenUnsettableESet));
619:                         }
620:                 }
621:         }
622:
623:         /**
624:          * <!-- begin-user-doc -->
625:          * <!-- end-user-doc -->
626:          *
627:          * @generated
628:          */
629:         public NotificationChain basicUnsetChildrenUnsettable(NotificationChain msgs) {
630:                 final Base oldChildrenUnsettable = childrenUnsettable;
631:                 childrenUnsettable = null;
632:                 final boolean oldChildrenUnsettableESet = childrenUnsettableESet;
633:                 childrenUnsettableESet = false;
634:•                if (eNotificationRequired()) {
635:                         final ENotificationImpl notification = new ENotificationImpl(this, Notification.UNSET,
636:                                 TestPackage.BASE__CHILDREN_UNSETTABLE, oldChildrenUnsettable, null, oldChildrenUnsettableESet);
637:•                        if (msgs == null) {
638:                                 msgs = notification;
639:                         } else {
640:                                 msgs.add(notification);
641:                         }
642:                 }
643:                 return msgs;
644:         }
645:
646:         /**
647:          * <!-- begin-user-doc -->
648:          * <!-- end-user-doc -->
649:          *
650:          * @generated
651:          */
652:         @Override
653:         public void unsetChildrenUnsettable() {
654:•                if (childrenUnsettable != null) {
655:                         NotificationChain msgs = null;
656:                         msgs = ((InternalEObject) childrenUnsettable).eInverseRemove(this,
657:                                 EOPPOSITE_FEATURE_BASE - TestPackage.BASE__CHILDREN_UNSETTABLE, null, msgs);
658:                         msgs = basicUnsetChildrenUnsettable(msgs);
659:•                        if (msgs != null) {
660:                                 msgs.dispatch();
661:                         }
662:                 } else {
663:                         final boolean oldChildrenUnsettableESet = childrenUnsettableESet;
664:                         childrenUnsettableESet = false;
665:•                        if (eNotificationRequired()) {
666:                                 eNotify(new ENotificationImpl(this, Notification.UNSET, TestPackage.BASE__CHILDREN_UNSETTABLE, null,
667:                                         null, oldChildrenUnsettableESet));
668:                         }
669:                 }
670:         }
671:
672:         /**
673:          * <!-- begin-user-doc -->
674:          * <!-- end-user-doc -->
675:          *
676:          * @generated
677:          */
678:         @Override
679:         public boolean isSetChildrenUnsettable() {
680:                 return childrenUnsettableESet;
681:         }
682:
683:         /**
684:          * <!-- begin-user-doc -->
685:          * <!-- end-user-doc -->
686:          *
687:          * @generated
688:          */
689:         @Override
690:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
691:•                switch (featureID) {
692:                 case TestPackage.BASE__CHILD:
693:                         return basicSetChild(null, msgs);
694:                 case TestPackage.BASE__CHILD_UNSETTABLE:
695:                         return basicUnsetChildUnsettable(msgs);
696:                 case TestPackage.BASE__CHILDREN:
697:                         return ((InternalEList<?>) getChildren()).basicRemove(otherEnd, msgs);
698:                 case TestPackage.BASE__CHILDREN_UNSETTABLE:
699:                         return basicUnsetChildrenUnsettable(msgs);
700:                 }
701:                 return super.eInverseRemove(otherEnd, featureID, msgs);
702:         }
703:
704:         /**
705:          * <!-- begin-user-doc -->
706:          * <!-- end-user-doc -->
707:          *
708:          * @generated
709:          */
710:         @Override
711:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
712:•                switch (featureID) {
713:                 case TestPackage.BASE__SINGLE_ATTRIBUTE:
714:                         return getSingleAttribute();
715:                 case TestPackage.BASE__SINGLE_ATTRIBUTE_UNSETTABLE:
716:                         return getSingleAttributeUnsettable();
717:                 case TestPackage.BASE__MULTI_ATTRIBUTE:
718:                         return getMultiAttribute();
719:                 case TestPackage.BASE__MULTI_ATTRIBUTE_UNSETTABLE:
720:                         return getMultiAttributeUnsettable();
721:                 case TestPackage.BASE__CHILD:
722:                         return getChild();
723:                 case TestPackage.BASE__CHILD_UNSETTABLE:
724:                         return getChildUnsettable();
725:                 case TestPackage.BASE__CHILDREN:
726:                         return getChildren();
727:                 case TestPackage.BASE__CHILDREN_UNSETTABLE:
728:                         return getChildrenUnsettable();
729:                 }
730:                 return super.eGet(featureID, resolve, coreType);
731:         }
732:
733:         /**
734:          * <!-- begin-user-doc -->
735:          * <!-- end-user-doc -->
736:          *
737:          * @generated
738:          */
739:         @SuppressWarnings("unchecked")
740:         @Override
741:         public void eSet(int featureID, Object newValue) {
742:•                switch (featureID) {
743:                 case TestPackage.BASE__SINGLE_ATTRIBUTE:
744:                         setSingleAttribute((String) newValue);
745:                         return;
746:                 case TestPackage.BASE__SINGLE_ATTRIBUTE_UNSETTABLE:
747:                         setSingleAttributeUnsettable((String) newValue);
748:                         return;
749:                 case TestPackage.BASE__MULTI_ATTRIBUTE:
750:                         getMultiAttribute().clear();
751:                         getMultiAttribute().addAll((Collection<? extends String>) newValue);
752:                         return;
753:                 case TestPackage.BASE__MULTI_ATTRIBUTE_UNSETTABLE:
754:                         getMultiAttributeUnsettable().clear();
755:                         getMultiAttributeUnsettable().addAll((Collection<? extends String>) newValue);
756:                         return;
757:                 case TestPackage.BASE__CHILD:
758:                         setChild((Base) newValue);
759:                         return;
760:                 case TestPackage.BASE__CHILD_UNSETTABLE:
761:                         setChildUnsettable((Base) newValue);
762:                         return;
763:                 case TestPackage.BASE__CHILDREN:
764:                         getChildren().clear();
765:                         getChildren().addAll((Collection<? extends Base>) newValue);
766:                         return;
767:                 case TestPackage.BASE__CHILDREN_UNSETTABLE:
768:                         setChildrenUnsettable((Base) newValue);
769:                         return;
770:                 }
771:                 super.eSet(featureID, newValue);
772:         }
773:
774:         /**
775:          * <!-- begin-user-doc -->
776:          * <!-- end-user-doc -->
777:          *
778:          * @generated
779:          */
780:         @Override
781:         public void eUnset(int featureID) {
782:•                switch (featureID) {
783:                 case TestPackage.BASE__SINGLE_ATTRIBUTE:
784:                         setSingleAttribute(SINGLE_ATTRIBUTE_EDEFAULT);
785:                         return;
786:                 case TestPackage.BASE__SINGLE_ATTRIBUTE_UNSETTABLE:
787:                         unsetSingleAttributeUnsettable();
788:                         return;
789:                 case TestPackage.BASE__MULTI_ATTRIBUTE:
790:                         getMultiAttribute().clear();
791:                         return;
792:                 case TestPackage.BASE__MULTI_ATTRIBUTE_UNSETTABLE:
793:                         unsetMultiAttributeUnsettable();
794:                         return;
795:                 case TestPackage.BASE__CHILD:
796:                         setChild((Base) null);
797:                         return;
798:                 case TestPackage.BASE__CHILD_UNSETTABLE:
799:                         unsetChildUnsettable();
800:                         return;
801:                 case TestPackage.BASE__CHILDREN:
802:                         getChildren().clear();
803:                         return;
804:                 case TestPackage.BASE__CHILDREN_UNSETTABLE:
805:                         unsetChildrenUnsettable();
806:                         return;
807:                 }
808:                 super.eUnset(featureID);
809:         }
810:
811:         /**
812:          * <!-- begin-user-doc -->
813:          * <!-- end-user-doc -->
814:          *
815:          * @generated
816:          */
817:         @Override
818:         public boolean eIsSet(int featureID) {
819:•                switch (featureID) {
820:                 case TestPackage.BASE__SINGLE_ATTRIBUTE:
821:•                        return SINGLE_ATTRIBUTE_EDEFAULT == null ? singleAttribute != null
822:•                                : !SINGLE_ATTRIBUTE_EDEFAULT.equals(singleAttribute);
823:                 case TestPackage.BASE__SINGLE_ATTRIBUTE_UNSETTABLE:
824:                         return isSetSingleAttributeUnsettable();
825:                 case TestPackage.BASE__MULTI_ATTRIBUTE:
826:•                        return multiAttribute != null && !multiAttribute.isEmpty();
827:                 case TestPackage.BASE__MULTI_ATTRIBUTE_UNSETTABLE:
828:                         return isSetMultiAttributeUnsettable();
829:                 case TestPackage.BASE__CHILD:
830:•                        return child != null;
831:                 case TestPackage.BASE__CHILD_UNSETTABLE:
832:                         return isSetChildUnsettable();
833:                 case TestPackage.BASE__CHILDREN:
834:•                        return children != null && !children.isEmpty();
835:                 case TestPackage.BASE__CHILDREN_UNSETTABLE:
836:                         return isSetChildrenUnsettable();
837:                 }
838:                 return super.eIsSet(featureID);
839:         }
840:
841:         /**
842:          * <!-- begin-user-doc -->
843:          * <!-- end-user-doc -->
844:          *
845:          * @generated
846:          */
847:         @Override
848:         public String toString() {
849:•                if (eIsProxy()) {
850:                         return super.toString();
851:                 }
852:
853:                 final StringBuffer result = new StringBuffer(super.toString());
854:                 result.append(" (singleAttribute: "); //$NON-NLS-1$
855:                 result.append(singleAttribute);
856:                 result.append(", singleAttributeUnsettable: "); //$NON-NLS-1$
857:•                if (singleAttributeUnsettableESet) {
858:                         result.append(singleAttributeUnsettable);
859:                 } else {
860:                         result.append("<unset>"); //$NON-NLS-1$
861:                 }
862:                 result.append(", multiAttribute: "); //$NON-NLS-1$
863:                 result.append(multiAttribute);
864:                 result.append(", multiAttributeUnsettable: "); //$NON-NLS-1$
865:                 result.append(multiAttributeUnsettable);
866:                 result.append(')');
867:                 return result.toString();
868:         }
869:
870: } // BaseImpl