diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/CanReferenceLegacyImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/CanReferenceLegacyImpl.java | 49 |
1 files changed, 34 insertions, 15 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/CanReferenceLegacyImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/CanReferenceLegacyImpl.java index 93d4a3ca7b..0da29b3eed 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/CanReferenceLegacyImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/CanReferenceLegacyImpl.java @@ -10,28 +10,23 @@ */ package org.eclipse.emf.cdo.tests.model6.legacy.impl; -import java.util.Collection; - import org.eclipse.emf.cdo.tests.model6.CanReferenceLegacy; - import org.eclipse.emf.cdo.tests.model6.legacy.Model6Package; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; - import org.eclipse.emf.common.util.EList; - import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.InternalEObject; - import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.EObjectImpl; - import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.EObjectResolvingEList; import org.eclipse.emf.ecore.util.InternalEList; +import java.util.Collection; + /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Can Reference Legacy</b></em>'. @@ -125,18 +120,22 @@ public class CanReferenceLegacyImpl extends EObjectImpl implements CanReferenceL if (singleContainment != oldSingleContainment) { InternalEObject newSingleContainment = (InternalEObject)singleContainment; - NotificationChain msgs = oldSingleContainment.eInverseRemove(this, EOPPOSITE_FEATURE_BASE - - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, null); + NotificationChain msgs = oldSingleContainment.eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, null); if (newSingleContainment.eInternalContainer() == null) { - msgs = newSingleContainment.eInverseAdd(this, EOPPOSITE_FEATURE_BASE - - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, msgs); + msgs = newSingleContainment.eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, msgs); } if (msgs != null) + { msgs.dispatch(); + } if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, oldSingleContainment, singleContainment)); + } } } return singleContainment; @@ -166,9 +165,13 @@ public class CanReferenceLegacyImpl extends EObjectImpl implements CanReferenceL ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, oldSingleContainment, newSingleContainment); if (msgs == null) + { msgs = notification; + } else + { msgs.add(notification); + } } return msgs; } @@ -184,18 +187,26 @@ public class CanReferenceLegacyImpl extends EObjectImpl implements CanReferenceL { NotificationChain msgs = null; if (singleContainment != null) - msgs = ((InternalEObject)singleContainment).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, msgs); + { + msgs = ((InternalEObject)singleContainment).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, msgs); + } if (newSingleContainment != null) - msgs = ((InternalEObject)newSingleContainment).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, msgs); + { + msgs = ((InternalEObject)newSingleContainment).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, null, msgs); + } msgs = basicSetSingleContainment(newSingleContainment, msgs); if (msgs != null) + { msgs.dispatch(); + } } else if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT, newSingleContainment, newSingleContainment)); + } } /** @@ -227,8 +238,10 @@ public class CanReferenceLegacyImpl extends EObjectImpl implements CanReferenceL if (singleReference != oldSingleReference) { if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model6Package.CAN_REFERENCE_LEGACY__SINGLE_REFERENCE, oldSingleReference, singleReference)); + } } } return singleReference; @@ -254,8 +267,10 @@ public class CanReferenceLegacyImpl extends EObjectImpl implements CanReferenceL EObject oldSingleReference = singleReference; singleReference = newSingleReference; if (eNotificationRequired()) + { eNotify(new ENotificationImpl(this, Notification.SET, Model6Package.CAN_REFERENCE_LEGACY__SINGLE_REFERENCE, oldSingleReference, singleReference)); + } } /** @@ -303,13 +318,17 @@ public class CanReferenceLegacyImpl extends EObjectImpl implements CanReferenceL { case Model6Package.CAN_REFERENCE_LEGACY__SINGLE_CONTAINMENT: if (resolve) + { return getSingleContainment(); + } return basicGetSingleContainment(); case Model6Package.CAN_REFERENCE_LEGACY__MULTIPLE_CONTAINMENT: return getMultipleContainment(); case Model6Package.CAN_REFERENCE_LEGACY__SINGLE_REFERENCE: if (resolve) + { return getSingleReference(); + } return basicGetSingleReference(); case Model6Package.CAN_REFERENCE_LEGACY__MULTIPLE_REFERENCE: return getMultipleReference(); |