From 7a7bef31452e23f006f9233e24789e2c8a85ba2e Mon Sep 17 00:00:00 2001 From: Caspar De Groot Date: Mon, 16 Aug 2010 10:03:39 +0000 Subject: [322742] List delta problem: SET plus REMOVE results in nothing https://bugs.eclipse.org/bugs/show_bug.cgi?id=322742 --- .../revision/delta/CDOListFeatureDeltaImpl.java | 7 +- .../revision/delta/CDORevisionDeltaImpl.java | 5 + .../META-INF/MANIFEST.MF | 14 +- .../model/model3.ecore | 24 + .../emf/cdo/tests/legacy/model3/Model3Factory.java | 18 + .../emf/cdo/tests/legacy/model3/Model3Package.java | 385 +++++++++++++++- .../cdo/tests/legacy/model3/impl/Class1Impl.java | 2 - .../cdo/tests/legacy/model3/impl/MetaRefImpl.java | 6 - .../legacy/model3/impl/Model3FactoryImpl.java | 28 ++ .../legacy/model3/impl/Model3PackageImpl.java | 220 ++++++++- .../cdo/tests/legacy/model3/impl/NodeAImpl.java | 37 ++ .../cdo/tests/legacy/model3/impl/NodeCImpl.java | 424 ++++++++++++++++++ .../cdo/tests/legacy/model3/impl/NodeDImpl.java | 490 +++++++++++++++++++++ .../cdo/tests/legacy/model3/impl/PolygonImpl.java | 2 - .../model3/impl/PolygonWithDuplicatesImpl.java | 2 - .../subpackage/impl/SubpackagePackageImpl.java | 9 +- .../model3/subpackage/util/SubpackageSwitch.java | 2 - .../legacy/model3/util/Model3AdapterFactory.java | 42 ++ .../cdo/tests/legacy/model3/util/Model3Switch.java | 56 ++- .../emf/cdo/tests/model3/Model3Factory.java | 16 + .../emf/cdo/tests/model3/Model3Package.java | 382 +++++++++++++++- .../org/eclipse/emf/cdo/tests/model3/NodeA.java | 17 + .../org/eclipse/emf/cdo/tests/model3/NodeC.java | 144 ++++++ .../org/eclipse/emf/cdo/tests/model3/NodeD.java | 155 +++++++ .../cdo/tests/model3/impl/Model3FactoryImpl.java | 28 ++ .../cdo/tests/model3/impl/Model3PackageImpl.java | 205 ++++++++- .../emf/cdo/tests/model3/impl/NodeAImpl.java | 12 + .../emf/cdo/tests/model3/impl/NodeCImpl.java | 143 ++++++ .../emf/cdo/tests/model3/impl/NodeDImpl.java | 152 +++++++ .../subpackage/impl/SubpackagePackageImpl.java | 9 +- .../model3/subpackage/util/SubpackageSwitch.java | 2 - .../tests/model3/util/Model3AdapterFactory.java | 42 ++ .../emf/cdo/tests/model3/util/Model3Switch.java | 56 ++- .../eclipse/emf/cdo/tests/RevisionDeltaTest.java | 89 ++++ 34 files changed, 3141 insertions(+), 84 deletions(-) create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java index ceb0fb1625..e49a93e370 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java @@ -22,6 +22,7 @@ import org.eclipse.emf.cdo.common.revision.delta.CDOFeatureDeltaVisitor; import org.eclipse.emf.cdo.common.revision.delta.CDOListFeatureDelta; import org.eclipse.emf.cdo.common.revision.delta.CDOMoveFeatureDelta; import org.eclipse.emf.cdo.common.revision.delta.CDORemoveFeatureDelta; +import org.eclipse.emf.cdo.common.revision.delta.CDOSetFeatureDelta; import org.eclipse.net4j.util.ObjectUtil; import org.eclipse.net4j.util.collection.Pair; @@ -357,8 +358,10 @@ public class CDOListFeatureDeltaImpl extends CDOFeatureDeltaImpl implements CDOL } - // We virtually "executed" the REMOVE so we do not add it to the feature deltas. - return false; + // If the removed delta was SET we we add the REMOVE to the feature deltas. + // If the removed delta was ADD we we do not add the REMOVE to the feature deltas. + boolean addRemoveDelta = delta instanceof CDOSetFeatureDelta; + return addRemoveDelta; } } } diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java index 5ec2cb78cf..a008856668 100644 --- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java +++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java @@ -209,6 +209,11 @@ public class CDORevisionDeltaImpl implements InternalCDORevisionDelta return featureDeltas; } + public CDOFeatureDelta getFeatureDelta(EStructuralFeature feature) + { + return featureDeltas.get(feature); + } + public List getFeatureDeltas() { return new ArrayList(featureDeltas.values()); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.model3/META-INF/MANIFEST.MF index b7e3a9b9e7..be79a7eee5 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.emf.cdo.tests.model3/META-INF/MANIFEST.MF @@ -1,7 +1,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.eclipse.emf.cdo.tests.model3; singleton:=true -Bundle-Version: 3.0.0.qualifier +Bundle-Version: 3.0.1.qualifier Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-Localization: plugin @@ -16,9 +16,9 @@ Export-Package: org.eclipse.emf.cdo.tests.legacy.model3;version="3.0.0", org.eclipse.emf.cdo.tests.legacy.model3.subpackage.impl;version="3.0.0", org.eclipse.emf.cdo.tests.legacy.model3.subpackage.util;version="3.0.0", org.eclipse.emf.cdo.tests.legacy.model3.util;version="3.0.0", - org.eclipse.emf.cdo.tests.model3;version="3.0.0", - org.eclipse.emf.cdo.tests.model3.impl;version="3.0.0", - org.eclipse.emf.cdo.tests.model3.subpackage;version="3.0.0", - org.eclipse.emf.cdo.tests.model3.subpackage.impl;version="3.0.0", - org.eclipse.emf.cdo.tests.model3.subpackage.util;version="3.0.0", - org.eclipse.emf.cdo.tests.model3.util;version="3.0.0" + org.eclipse.emf.cdo.tests.model3;version="3.0.1", + org.eclipse.emf.cdo.tests.model3.impl;version="3.0.1", + org.eclipse.emf.cdo.tests.model3.subpackage;version="3.0.1", + org.eclipse.emf.cdo.tests.model3.subpackage.impl;version="3.0.1", + org.eclipse.emf.cdo.tests.model3.subpackage.util;version="3.0.1", + org.eclipse.emf.cdo.tests.model3.util;version="3.0.1" diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore index 0c28dc808a..0fc468f2f6 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore +++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore @@ -23,6 +23,8 @@ + + + + + + + + + + + + + + + diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java index a6c71248b5..5913fe31a2 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java @@ -14,6 +14,8 @@ import org.eclipse.emf.cdo.tests.model3.Class1; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -81,6 +83,22 @@ public interface Model3Factory extends org.eclipse.emf.cdo.tests.model3.Model3Fa */ NodeB createNodeB(); + /** + * Returns a new object of class 'Node C'. + * + * @return a new object of class 'Node C'. + * @generated + */ + NodeC createNodeC(); + + /** + * Returns a new object of class 'Node D'. + * + * @return a new object of class 'Node D'. + * @generated + */ + NodeD createNodeD(); + /** * Returns the package supported by this factory. * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java index ac4338d5ac..1640dad4ef 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java @@ -191,13 +191,21 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa */ int NODE_A__NAME = 1; + /** + * The feature id for the 'Other Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_A__OTHER_NODES = 2; + /** * The number of structural features of the 'Node A' class. * * @generated * @ordered */ - int NODE_A_FEATURE_COUNT = 2; + int NODE_A_FEATURE_COUNT = 3; /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl Node B}' class. @@ -242,6 +250,125 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa */ int NODE_B_FEATURE_COUNT = 3; + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl Node C}' class. + * + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeC() + * @generated + */ + int NODE_C = 6; + + /** + * The feature id for the 'Children' containment reference list. + * + * @generated + * @ordered + */ + int NODE_C__CHILDREN = 0; + + /** + * The feature id for the 'Parent' container reference. + * + * @generated + * @ordered + */ + int NODE_C__PARENT = 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int NODE_C__NAME = 2; + + /** + * The feature id for the 'Other Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_C__OTHER_NODES = 3; + + /** + * The feature id for the 'Opposite Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_C__OPPOSITE_NODES = 4; + + /** + * The number of structural features of the 'Node C' class. + * + * @generated + * @ordered + */ + int NODE_C_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl Node D}' class. + * + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeD() + * @generated + */ + int NODE_D = 7; + + /** + * The feature id for the 'Children' containment reference list. + * + * @generated + * @ordered + */ + int NODE_D__CHILDREN = 0; + + /** + * The feature id for the 'Parent' container reference. + * + * @generated + * @ordered + */ + int NODE_D__PARENT = 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int NODE_D__NAME = 2; + + /** + * The feature id for the 'Other Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_D__OTHER_NODES = 3; + + /** + * The feature id for the 'Opposite Node' reference. + * + * @generated + * @ordered + */ + int NODE_D__OPPOSITE_NODE = 4; + + /** + * The number of structural features of the 'Node D' class. + * + * @generated + * @ordered + */ + int NODE_D_FEATURE_COUNT = 5; + /** * The meta object id for the 'Point' data type. * @@ -249,7 +376,7 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getPoint() * @generated */ - int POINT = 6; + int POINT = 8; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.Class1 Class1}'. + * + * @return the meta object for the reference list 'Other Nodes'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getOtherNodes() + * @see #getNodeA() + * @generated + */ + EReference getNodeA_OtherNodes(); + /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeB Node B}'. @@ -414,6 +552,141 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa */ EAttribute getNodeB_Name(); + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC Node C}'. + * + * @return the meta object for class 'Node C'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC + * @generated + */ + EClass getNodeC(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getChildren Children}'. + * + * @return the meta object for the containment reference list 'Children'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getChildren() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_Children(); + + /** + * Returns the meta object for the container reference ' + * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getParent Parent}'. + * + * @return the meta object for the container reference 'Parent'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getParent() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_Parent(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getName + * Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getName() + * @see #getNodeC() + * @generated + */ + EAttribute getNodeC_Name(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getOtherNodes + * Other Nodes}'. + * + * @return the meta object for the reference list 'Other Nodes'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getOtherNodes() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_OtherNodes(); + + /** + * Returns the meta object for the reference list ' + * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getOppositeNodes Opposite Nodes}'. + * + * @return the meta object for the reference list 'Opposite Nodes'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC#getOppositeNodes() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_OppositeNodes(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD Node D}'. + * + * @return the meta object for class 'Node D'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD + * @generated + */ + EClass getNodeD(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getChildren Children}'. + * + * @return the meta object for the containment reference list 'Children'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getChildren() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_Children(); + + /** + * Returns the meta object for the container reference ' + * {@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getParent Parent}'. + * + * @return the meta object for the container reference 'Parent'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getParent() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_Parent(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getName + * Name}'. + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getName() + * @see #getNodeD() + * @generated + */ + EAttribute getNodeD_Name(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOtherNodes + * Other Nodes}'. + * + * @return the meta object for the reference list 'Other Nodes'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOtherNodes() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_OtherNodes(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOppositeNode + * Opposite Node}'. + * + * @return the meta object for the reference 'Opposite Node'. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD#getOppositeNode() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_OppositeNode(); + /** * Returns the meta object for data type '{@link org.eclipse.emf.cdo.tests.model3.Point Point}'. @@ -545,6 +818,14 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa */ EAttribute NODE_A__NAME = eINSTANCE.getNodeA_Name(); + /** + * The meta object literal for the 'Other Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_A__OTHER_NODES = eINSTANCE.getNodeA_OtherNodes(); + /** * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeBImpl Node B}' * class. @@ -579,6 +860,106 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa */ EAttribute NODE_B__NAME = eINSTANCE.getNodeB_Name(); + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl Node C}' + * class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeC() + * @generated + */ + EClass NODE_C = eINSTANCE.getNodeC(); + + /** + * The meta object literal for the 'Children' containment reference list feature. + * + * @generated + */ + EReference NODE_C__CHILDREN = eINSTANCE.getNodeC_Children(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference NODE_C__PARENT = eINSTANCE.getNodeC_Parent(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * @generated + */ + EAttribute NODE_C__NAME = eINSTANCE.getNodeC_Name(); + + /** + * The meta object literal for the 'Other Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_C__OTHER_NODES = eINSTANCE.getNodeC_OtherNodes(); + + /** + * The meta object literal for the 'Opposite Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_C__OPPOSITE_NODES = eINSTANCE.getNodeC_OppositeNodes(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl Node D}' + * class. + * + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl + * @see org.eclipse.emf.cdo.tests.legacy.model3.impl.Model3PackageImpl#getNodeD() + * @generated + */ + EClass NODE_D = eINSTANCE.getNodeD(); + + /** + * The meta object literal for the 'Children' containment reference list feature. + * + * @generated + */ + EReference NODE_D__CHILDREN = eINSTANCE.getNodeD_Children(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference NODE_D__PARENT = eINSTANCE.getNodeD_Parent(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * @generated + */ + EAttribute NODE_D__NAME = eINSTANCE.getNodeD_Name(); + + /** + * The meta object literal for the 'Other Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_D__OTHER_NODES = eINSTANCE.getNodeD_OtherNodes(); + + /** + * The meta object literal for the 'Opposite Node' reference feature. + * + * @generated + */ + EReference NODE_D__OPPOSITE_NODE = eINSTANCE.getNodeD_OppositeNode(); + /** * The meta object literal for the 'Point' data type. * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java index 60637a1e00..6837d39b32 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java @@ -92,9 +92,7 @@ public class Class1Impl extends EObjectImpl implements Class1 public void unsetClass2() { if (class2 != null) - { ((InternalEList.Unsettable)class2).unset(); - } } /** diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java index f5ead76799..34596e57e4 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java @@ -78,10 +78,8 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef if (ePackageRef != oldEPackageRef) { if (eNotificationRequired()) - { eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model3Package.META_REF__EPACKAGE_REF, oldEPackageRef, ePackageRef)); - } } } return ePackageRef; @@ -107,10 +105,8 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef EPackage oldEPackageRef = ePackageRef; ePackageRef = newEPackageRef; if (eNotificationRequired()) - { eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.META_REF__EPACKAGE_REF, oldEPackageRef, ePackageRef)); - } } /** @@ -125,9 +121,7 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef { case Model3Package.META_REF__EPACKAGE_REF: if (resolve) - { return getEPackageRef(); - } return basicGetEPackageRef(); } return super.eGet(featureID, resolve, coreType); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java index 19ae985a94..a676eecaa9 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java @@ -16,6 +16,8 @@ import org.eclipse.emf.cdo.tests.model3.Class1; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Point; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -89,6 +91,10 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return createNodeA(); case Model3Package.NODE_B: return createNodeB(); + case Model3Package.NODE_C: + return createNodeC(); + case Model3Package.NODE_D: + return createNodeD(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -194,6 +200,28 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return nodeB; } + /** + * + * + * @generated + */ + public NodeC createNodeC() + { + NodeCImpl nodeC = new NodeCImpl(); + return nodeC; + } + + /** + * + * + * @generated + */ + public NodeD createNodeD() + { + NodeDImpl nodeD = new NodeDImpl(); + return nodeD; + } + /** * * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java index 5eaa188140..1540a1d8a2 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java @@ -18,6 +18,8 @@ import org.eclipse.emf.cdo.tests.model3.Class1; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Point; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -79,6 +81,20 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package */ private EClass nodeBEClass = null; + /** + * + * + * @generated + */ + private EClass nodeCEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeDEClass = null; + /** * * @@ -126,14 +142,11 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public static Model3Package init() { if (isInited) - { return (Model3Package)EPackage.Registry.INSTANCE.getEPackage(Model3Package.eNS_URI); - } // Obtain or create and register package Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model3PackageImpl ? EPackage.Registry.INSTANCE - .get(eNS_URI) - : new Model3PackageImpl()); + .get(eNS_URI) : new Model3PackageImpl()); isInited = true; @@ -271,6 +284,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package return (EAttribute)nodeAEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + public EReference getNodeA_OtherNodes() + { + return (EReference)nodeAEClass.getEStructuralFeatures().get(2); + } + /** * * @@ -311,6 +334,126 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package return (EAttribute)nodeBEClass.getEStructuralFeatures().get(2); } + /** + * + * + * @generated + */ + public EClass getNodeC() + { + return nodeCEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeC_Children() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getNodeC_Parent() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getNodeC_Name() + { + return (EAttribute)nodeCEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getNodeC_OtherNodes() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getNodeC_OppositeNodes() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getNodeD() + { + return nodeDEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeD_Children() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getNodeD_Parent() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getNodeD_Name() + { + return (EAttribute)nodeDEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getNodeD_OtherNodes() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getNodeD_OppositeNode() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(4); + } + /** * * @@ -347,9 +490,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public void createPackageContents() { if (isCreated) - { return; - } isCreated = true; // Create classes and their features @@ -368,12 +509,27 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package nodeAEClass = createEClass(NODE_A); createEReference(nodeAEClass, NODE_A__CHILDREN); createEAttribute(nodeAEClass, NODE_A__NAME); + createEReference(nodeAEClass, NODE_A__OTHER_NODES); nodeBEClass = createEClass(NODE_B); createEReference(nodeBEClass, NODE_B__CHILDREN); createEReference(nodeBEClass, NODE_B__PARENT); createEAttribute(nodeBEClass, NODE_B__NAME); + nodeCEClass = createEClass(NODE_C); + createEReference(nodeCEClass, NODE_C__CHILDREN); + createEReference(nodeCEClass, NODE_C__PARENT); + createEAttribute(nodeCEClass, NODE_C__NAME); + createEReference(nodeCEClass, NODE_C__OTHER_NODES); + createEReference(nodeCEClass, NODE_C__OPPOSITE_NODES); + + nodeDEClass = createEClass(NODE_D); + createEReference(nodeDEClass, NODE_D__CHILDREN); + createEReference(nodeDEClass, NODE_D__PARENT); + createEAttribute(nodeDEClass, NODE_D__NAME); + createEReference(nodeDEClass, NODE_D__OTHER_NODES); + createEReference(nodeDEClass, NODE_D__OPPOSITE_NODE); + // Create data types pointEDataType = createEDataType(POINT); } @@ -394,9 +550,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public void initializePackageContents() { if (isInitialized) - { return; - } isInitialized = true; // Initialize package @@ -430,31 +584,67 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(polygonEClass, Polygon.class, "Polygon", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPolygon_Points(), getPoint(), "points", null, 1, -1, Polygon.class, !IS_TRANSIENT, !IS_VOLATILE, - IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPolygon_Points(), this.getPoint(), "points", null, 1, -1, Polygon.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(polygonWithDuplicatesEClass, PolygonWithDuplicates.class, "PolygonWithDuplicates", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getPolygonWithDuplicates_Points(), getPoint(), "points", null, 1, -1, PolygonWithDuplicates.class, - !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPolygonWithDuplicates_Points(), this.getPoint(), "points", null, 1, -1, + PolygonWithDuplicates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); initEClass(nodeAEClass, NodeA.class, "NodeA", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNodeA_Children(), getNodeA(), null, "children", null, 0, -1, NodeA.class, !IS_TRANSIENT, + initEReference(getNodeA_Children(), this.getNodeA(), null, "children", null, 0, -1, NodeA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getNodeA_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeA_OtherNodes(), this.getNodeA(), null, "otherNodes", null, 0, -1, NodeA.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); initEClass(nodeBEClass, NodeB.class, "NodeB", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getNodeB_Children(), getNodeB(), getNodeB_Parent(), "children", null, 0, -1, NodeB.class, + initEReference(getNodeB_Children(), this.getNodeB(), this.getNodeB_Parent(), "children", null, 0, -1, NodeB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getNodeB_Parent(), getNodeB(), getNodeB_Children(), "parent", null, 0, 1, NodeB.class, + initEReference(getNodeB_Parent(), this.getNodeB(), this.getNodeB_Children(), "parent", null, 0, 1, NodeB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getNodeB_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(nodeCEClass, NodeC.class, "NodeC", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getNodeC_Children(), this.getNodeC(), this.getNodeC_Parent(), "children", null, 0, -1, NodeC.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getNodeC_Parent(), this.getNodeC(), this.getNodeC_Children(), "parent", null, 0, 1, NodeC.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getNodeC_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeC.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeC_OtherNodes(), this.getNodeC(), this.getNodeC_OppositeNodes(), "otherNodes", null, 0, -1, + NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeC_OppositeNodes(), this.getNodeC(), this.getNodeC_OtherNodes(), "oppositeNodes", null, 0, -1, + NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(nodeDEClass, NodeD.class, "NodeD", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getNodeD_Children(), this.getNodeD(), this.getNodeD_Parent(), "children", null, 0, -1, NodeD.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_Parent(), this.getNodeD(), this.getNodeD_Children(), "parent", null, 0, 1, NodeD.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getNodeD_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeD.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_OtherNodes(), this.getNodeD(), this.getNodeD_OppositeNode(), "otherNodes", null, 0, -1, + NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_OppositeNode(), this.getNodeD(), this.getNodeD_OtherNodes(), "oppositeNode", null, 0, 1, + NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize data types initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java index 69559b5553..06fb1c8655 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java @@ -21,6 +21,7 @@ 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; @@ -32,6 +33,7 @@ import java.util.Collection; *
    *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getChildren Children}
  • *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getOtherNodes Other Nodes}
  • *
*

* @@ -68,6 +70,16 @@ public class NodeAImpl extends EObjectImpl implements NodeA */ protected String name = NAME_EDEFAULT; + /** + * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * + * + * @see #getOtherNodes() + * @generated + * @ordered + */ + protected EList otherNodes; + /** * * @@ -126,6 +138,20 @@ public class NodeAImpl extends EObjectImpl implements NodeA eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.NODE_A__NAME, oldName, name)); } + /** + * + * + * @generated + */ + public EList getOtherNodes() + { + if (otherNodes == null) + { + otherNodes = new EObjectResolvingEList(NodeA.class, this, Model3Package.NODE_A__OTHER_NODES); + } + return otherNodes; + } + /** * * @@ -156,6 +182,8 @@ public class NodeAImpl extends EObjectImpl implements NodeA return getChildren(); case Model3Package.NODE_A__NAME: return getName(); + case Model3Package.NODE_A__OTHER_NODES: + return getOtherNodes(); } return super.eGet(featureID, resolve, coreType); } @@ -178,6 +206,10 @@ public class NodeAImpl extends EObjectImpl implements NodeA case Model3Package.NODE_A__NAME: setName((String)newValue); return; + case Model3Package.NODE_A__OTHER_NODES: + getOtherNodes().clear(); + getOtherNodes().addAll((Collection)newValue); + return; } super.eSet(featureID, newValue); } @@ -198,6 +230,9 @@ public class NodeAImpl extends EObjectImpl implements NodeA case Model3Package.NODE_A__NAME: setName(NAME_EDEFAULT); return; + case Model3Package.NODE_A__OTHER_NODES: + getOtherNodes().clear(); + return; } super.eUnset(featureID); } @@ -216,6 +251,8 @@ public class NodeAImpl extends EObjectImpl implements NodeA return children != null && !children.isEmpty(); case Model3Package.NODE_A__NAME: return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Model3Package.NODE_A__OTHER_NODES: + return otherNodes != null && !otherNodes.isEmpty(); } return super.eIsSet(featureID); } diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java new file mode 100644 index 0000000000..d2e5c68e8e --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java @@ -0,0 +1,424 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.legacy.model3.impl; + +import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; +import org.eclipse.emf.cdo.tests.model3.NodeC; + +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.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Node C'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getChildren Children}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getParent Parent}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOtherNodes Other Nodes}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOppositeNodes Opposite Nodes}
  • + *
+ *

+ * + * @generated + */ +public class NodeCImpl extends EObjectImpl implements NodeC +{ + /** + * The cached value of the '{@link #getChildren() Children}' containment reference list. + * + * @see #getChildren() + * @generated + * @ordered + */ + protected EList children; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * + * + * @see #getOtherNodes() + * @generated + * @ordered + */ + protected EList otherNodes; + + /** + * The cached value of the '{@link #getOppositeNodes() Opposite Nodes}' reference list. + * + * @see #getOppositeNodes() + * @generated + * @ordered + */ + protected EList oppositeNodes; + + /** + * + * + * @generated + */ + protected NodeCImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.NODE_C; + } + + /** + * + * + * @generated + */ + public EList getChildren() + { + if (children == null) + { + children = new EObjectContainmentWithInverseEList(NodeC.class, this, Model3Package.NODE_C__CHILDREN, + Model3Package.NODE_C__PARENT); + } + return children; + } + + /** + * + * + * @generated + */ + public NodeC getParent() + { + if (eContainerFeatureID() != Model3Package.NODE_C__PARENT) + return null; + return (NodeC)eContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParent(NodeC newParent, NotificationChain msgs) + { + msgs = eBasicSetContainer((InternalEObject)newParent, Model3Package.NODE_C__PARENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setParent(NodeC newParent) + { + if (newParent != eInternalContainer() + || (eContainerFeatureID() != Model3Package.NODE_C__PARENT && newParent != null)) + { + if (EcoreUtil.isAncestor(this, newParent)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParent != null) + msgs = ((InternalEObject)newParent).eInverseAdd(this, Model3Package.NODE_C__CHILDREN, NodeC.class, msgs); + msgs = basicSetParent(newParent, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.NODE_C__PARENT, newParent, newParent)); + } + + /** + * + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.NODE_C__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public EList getOtherNodes() + { + if (otherNodes == null) + { + otherNodes = new EObjectWithInverseResolvingEList.ManyInverse(NodeC.class, this, + Model3Package.NODE_C__OTHER_NODES, Model3Package.NODE_C__OPPOSITE_NODES); + } + return otherNodes; + } + + /** + * + * + * @generated + */ + public EList getOppositeNodes() + { + if (oppositeNodes == null) + { + oppositeNodes = new EObjectWithInverseResolvingEList.ManyInverse(NodeC.class, this, + Model3Package.NODE_C__OPPOSITE_NODES, Model3Package.NODE_C__OTHER_NODES); + } + return oppositeNodes; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model3Package.NODE_C__CHILDREN: + return ((InternalEList)(InternalEList)getChildren()).basicAdd(otherEnd, msgs); + case Model3Package.NODE_C__PARENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParent((NodeC)otherEnd, msgs); + case Model3Package.NODE_C__OTHER_NODES: + return ((InternalEList)(InternalEList)getOtherNodes()).basicAdd(otherEnd, msgs); + case Model3Package.NODE_C__OPPOSITE_NODES: + return ((InternalEList)(InternalEList)getOppositeNodes()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model3Package.NODE_C__CHILDREN: + return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs); + case Model3Package.NODE_C__PARENT: + return basicSetParent(null, msgs); + case Model3Package.NODE_C__OTHER_NODES: + return ((InternalEList)getOtherNodes()).basicRemove(otherEnd, msgs); + case Model3Package.NODE_C__OPPOSITE_NODES: + return ((InternalEList)getOppositeNodes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) + { + switch (eContainerFeatureID()) + { + case Model3Package.NODE_C__PARENT: + return eInternalContainer().eInverseRemove(this, Model3Package.NODE_C__CHILDREN, NodeC.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model3Package.NODE_C__CHILDREN: + return getChildren(); + case Model3Package.NODE_C__PARENT: + return getParent(); + case Model3Package.NODE_C__NAME: + return getName(); + case Model3Package.NODE_C__OTHER_NODES: + return getOtherNodes(); + case Model3Package.NODE_C__OPPOSITE_NODES: + return getOppositeNodes(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model3Package.NODE_C__CHILDREN: + getChildren().clear(); + getChildren().addAll((Collection)newValue); + return; + case Model3Package.NODE_C__PARENT: + setParent((NodeC)newValue); + return; + case Model3Package.NODE_C__NAME: + setName((String)newValue); + return; + case Model3Package.NODE_C__OTHER_NODES: + getOtherNodes().clear(); + getOtherNodes().addAll((Collection)newValue); + return; + case Model3Package.NODE_C__OPPOSITE_NODES: + getOppositeNodes().clear(); + getOppositeNodes().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model3Package.NODE_C__CHILDREN: + getChildren().clear(); + return; + case Model3Package.NODE_C__PARENT: + setParent((NodeC)null); + return; + case Model3Package.NODE_C__NAME: + setName(NAME_EDEFAULT); + return; + case Model3Package.NODE_C__OTHER_NODES: + getOtherNodes().clear(); + return; + case Model3Package.NODE_C__OPPOSITE_NODES: + getOppositeNodes().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model3Package.NODE_C__CHILDREN: + return children != null && !children.isEmpty(); + case Model3Package.NODE_C__PARENT: + return getParent() != null; + case Model3Package.NODE_C__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Model3Package.NODE_C__OTHER_NODES: + return otherNodes != null && !otherNodes.isEmpty(); + case Model3Package.NODE_C__OPPOSITE_NODES: + return oppositeNodes != null && !oppositeNodes.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} // NodeCImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java new file mode 100644 index 0000000000..c40b36fbf2 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java @@ -0,0 +1,490 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.legacy.model3.impl; + +import org.eclipse.emf.cdo.tests.legacy.model3.Model3Package; +import org.eclipse.emf.cdo.tests.model3.NodeD; + +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.InternalEObject; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +import java.util.Collection; + +/** + * An implementation of the model object 'Node D'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getChildren Children}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getParent Parent}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOtherNodes Other Nodes}
  • + *
  • {@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOppositeNode Opposite Node}
  • + *
+ *

+ * + * @generated + */ +public class NodeDImpl extends EObjectImpl implements NodeD +{ + /** + * The cached value of the '{@link #getChildren() Children}' containment reference list. + * + * @see #getChildren() + * @generated + * @ordered + */ + protected EList children; + + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The cached value of the '{@link #getOtherNodes() Other Nodes}' reference list. + * + * + * @see #getOtherNodes() + * @generated + * @ordered + */ + protected EList otherNodes; + + /** + * The cached value of the '{@link #getOppositeNode() Opposite Node}' reference. + * + * @see #getOppositeNode() + * @generated + * @ordered + */ + protected NodeD oppositeNode; + + /** + * + * + * @generated + */ + protected NodeDImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.NODE_D; + } + + /** + * + * + * @generated + */ + public EList getChildren() + { + if (children == null) + { + children = new EObjectContainmentWithInverseEList(NodeD.class, this, Model3Package.NODE_D__CHILDREN, + Model3Package.NODE_D__PARENT); + } + return children; + } + + /** + * + * + * @generated + */ + public NodeD getParent() + { + if (eContainerFeatureID() != Model3Package.NODE_D__PARENT) + return null; + return (NodeD)eContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParent(NodeD newParent, NotificationChain msgs) + { + msgs = eBasicSetContainer((InternalEObject)newParent, Model3Package.NODE_D__PARENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setParent(NodeD newParent) + { + if (newParent != eInternalContainer() + || (eContainerFeatureID() != Model3Package.NODE_D__PARENT && newParent != null)) + { + if (EcoreUtil.isAncestor(this, newParent)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParent != null) + msgs = ((InternalEObject)newParent).eInverseAdd(this, Model3Package.NODE_D__CHILDREN, NodeD.class, msgs); + msgs = basicSetParent(newParent, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.NODE_D__PARENT, newParent, newParent)); + } + + /** + * + * + * @generated + */ + public String getName() + { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) + { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.NODE_D__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public EList getOtherNodes() + { + if (otherNodes == null) + { + otherNodes = new EObjectWithInverseResolvingEList(NodeD.class, this, Model3Package.NODE_D__OTHER_NODES, + Model3Package.NODE_D__OPPOSITE_NODE); + } + return otherNodes; + } + + /** + * + * + * @generated + */ + public NodeD getOppositeNode() + { + if (oppositeNode != null && oppositeNode.eIsProxy()) + { + InternalEObject oldOppositeNode = (InternalEObject)oppositeNode; + oppositeNode = (NodeD)eResolveProxy(oldOppositeNode); + if (oppositeNode != oldOppositeNode) + { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model3Package.NODE_D__OPPOSITE_NODE, + oldOppositeNode, oppositeNode)); + } + } + return oppositeNode; + } + + /** + * + * + * @generated + */ + public NodeD basicGetOppositeNode() + { + return oppositeNode; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetOppositeNode(NodeD newOppositeNode, NotificationChain msgs) + { + NodeD oldOppositeNode = oppositeNode; + oppositeNode = newOppositeNode; + if (eNotificationRequired()) + { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + Model3Package.NODE_D__OPPOSITE_NODE, oldOppositeNode, newOppositeNode); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setOppositeNode(NodeD newOppositeNode) + { + if (newOppositeNode != oppositeNode) + { + NotificationChain msgs = null; + if (oppositeNode != null) + msgs = ((InternalEObject)oppositeNode).eInverseRemove(this, Model3Package.NODE_D__OTHER_NODES, NodeD.class, + msgs); + if (newOppositeNode != null) + msgs = ((InternalEObject)newOppositeNode).eInverseAdd(this, Model3Package.NODE_D__OTHER_NODES, NodeD.class, + msgs); + msgs = basicSetOppositeNode(newOppositeNode, msgs); + if (msgs != null) + msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.NODE_D__OPPOSITE_NODE, newOppositeNode, + newOppositeNode)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model3Package.NODE_D__CHILDREN: + return ((InternalEList)(InternalEList)getChildren()).basicAdd(otherEnd, msgs); + case Model3Package.NODE_D__PARENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParent((NodeD)otherEnd, msgs); + case Model3Package.NODE_D__OTHER_NODES: + return ((InternalEList)(InternalEList)getOtherNodes()).basicAdd(otherEnd, msgs); + case Model3Package.NODE_D__OPPOSITE_NODE: + if (oppositeNode != null) + msgs = ((InternalEObject)oppositeNode).eInverseRemove(this, Model3Package.NODE_D__OTHER_NODES, NodeD.class, + msgs); + return basicSetOppositeNode((NodeD)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) + { + switch (featureID) + { + case Model3Package.NODE_D__CHILDREN: + return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs); + case Model3Package.NODE_D__PARENT: + return basicSetParent(null, msgs); + case Model3Package.NODE_D__OTHER_NODES: + return ((InternalEList)getOtherNodes()).basicRemove(otherEnd, msgs); + case Model3Package.NODE_D__OPPOSITE_NODE: + return basicSetOppositeNode(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) + { + switch (eContainerFeatureID()) + { + case Model3Package.NODE_D__PARENT: + return eInternalContainer().eInverseRemove(this, Model3Package.NODE_D__CHILDREN, NodeD.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model3Package.NODE_D__CHILDREN: + return getChildren(); + case Model3Package.NODE_D__PARENT: + return getParent(); + case Model3Package.NODE_D__NAME: + return getName(); + case Model3Package.NODE_D__OTHER_NODES: + return getOtherNodes(); + case Model3Package.NODE_D__OPPOSITE_NODE: + if (resolve) + return getOppositeNode(); + return basicGetOppositeNode(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model3Package.NODE_D__CHILDREN: + getChildren().clear(); + getChildren().addAll((Collection)newValue); + return; + case Model3Package.NODE_D__PARENT: + setParent((NodeD)newValue); + return; + case Model3Package.NODE_D__NAME: + setName((String)newValue); + return; + case Model3Package.NODE_D__OTHER_NODES: + getOtherNodes().clear(); + getOtherNodes().addAll((Collection)newValue); + return; + case Model3Package.NODE_D__OPPOSITE_NODE: + setOppositeNode((NodeD)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model3Package.NODE_D__CHILDREN: + getChildren().clear(); + return; + case Model3Package.NODE_D__PARENT: + setParent((NodeD)null); + return; + case Model3Package.NODE_D__NAME: + setName(NAME_EDEFAULT); + return; + case Model3Package.NODE_D__OTHER_NODES: + getOtherNodes().clear(); + return; + case Model3Package.NODE_D__OPPOSITE_NODE: + setOppositeNode((NodeD)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model3Package.NODE_D__CHILDREN: + return children != null && !children.isEmpty(); + case Model3Package.NODE_D__PARENT: + return getParent() != null; + case Model3Package.NODE_D__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case Model3Package.NODE_D__OTHER_NODES: + return otherNodes != null && !otherNodes.isEmpty(); + case Model3Package.NODE_D__OPPOSITE_NODE: + return oppositeNode != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() + { + if (eIsProxy()) + return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(')'); + return result.toString(); + } + +} // NodeDImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java index daa4a6fd61..db6b4af643 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java @@ -156,9 +156,7 @@ public class PolygonImpl extends EObjectImpl implements Polygon public String toString() { if (eIsProxy()) - { return super.toString(); - } StringBuffer result = new StringBuffer(super.toString()); result.append(" (points: "); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java index 38dfd4acb9..9d066d95e3 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java @@ -157,9 +157,7 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit public String toString() { if (eIsProxy()) - { return super.toString(); - } StringBuffer result = new StringBuffer(super.toString()); result.append(" (points: "); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java index 660011cb18..1c3f85cfe8 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java @@ -76,14 +76,11 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac public static SubpackagePackage init() { if (isInited) - { return (SubpackagePackage)EPackage.Registry.INSTANCE.getEPackage(SubpackagePackage.eNS_URI); - } // Obtain or create and register package SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SubpackagePackageImpl ? EPackage.Registry.INSTANCE - .get(eNS_URI) - : new SubpackagePackageImpl()); + .get(eNS_URI) : new SubpackagePackageImpl()); isInited = true; @@ -157,9 +154,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac public void createPackageContents() { if (isCreated) - { return; - } isCreated = true; // Create classes and their features @@ -183,9 +178,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac public void initializePackageContents() { if (isInitialized) - { return; - } isInitialized = true; // Initialize package diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java index 0998561008..173208ba4f 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java @@ -97,9 +97,7 @@ public class SubpackageSwitch Class2 class2 = (Class2)theEObject; T result = caseClass2(class2); if (result == null) - { result = defaultCase(theEObject); - } return result; } default: diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java index a84ab31b39..97da57b11e 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java @@ -15,6 +15,8 @@ import org.eclipse.emf.cdo.tests.model3.Class1; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -117,6 +119,18 @@ public class Model3AdapterFactory extends AdapterFactoryImpl return createNodeBAdapter(); } + @Override + public Adapter caseNodeC(NodeC object) + { + return createNodeCAdapter(); + } + + @Override + public Adapter caseNodeD(NodeD object) + { + return createNodeDAdapter(); + } + @Override public Adapter defaultCase(EObject object) { @@ -223,6 +237,34 @@ public class Model3AdapterFactory extends AdapterFactoryImpl return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC Node C} + * '. This default implementation returns null so that we can easily ignore cases; it's useful + * to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeC + * @generated + */ + public Adapter createNodeCAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeD Node D} + * '. This default implementation returns null so that we can easily ignore cases; it's useful + * to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.legacy.model3.NodeD + * @generated + */ + public Adapter createNodeDAdapter() + { + return null; + } + /** * Creates a new adapter for the default case. This default implementation returns null. diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java index d4a8d9edbe..0ab8e39b1d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java @@ -15,6 +15,8 @@ import org.eclipse.emf.cdo.tests.model3.Class1; import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -102,9 +104,7 @@ public class Model3Switch Class1 class1 = (Class1)theEObject; T result = caseClass1(class1); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.META_REF: @@ -112,9 +112,7 @@ public class Model3Switch MetaRef metaRef = (MetaRef)theEObject; T result = caseMetaRef(metaRef); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.POLYGON: @@ -122,9 +120,7 @@ public class Model3Switch Polygon polygon = (Polygon)theEObject; T result = casePolygon(polygon); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.POLYGON_WITH_DUPLICATES: @@ -132,9 +128,7 @@ public class Model3Switch PolygonWithDuplicates polygonWithDuplicates = (PolygonWithDuplicates)theEObject; T result = casePolygonWithDuplicates(polygonWithDuplicates); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.NODE_A: @@ -153,6 +147,22 @@ public class Model3Switch result = defaultCase(theEObject); return result; } + case Model3Package.NODE_C: + { + NodeC nodeC = (NodeC)theEObject; + T result = caseNodeC(nodeC); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model3Package.NODE_D: + { + NodeD nodeD = (NodeD)theEObject; + T result = caseNodeD(nodeD); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } @@ -249,6 +259,36 @@ public class Model3Switch return null; } + /** + * Returns the result of interpreting the object as an instance of 'Node C'. This + * implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Node C'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeC(NodeC object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Node D'. This + * implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Node D'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeD(NodeD object) + { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'EObject'. This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java index e50d60a250..7865ee76b2 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java @@ -76,6 +76,22 @@ public interface Model3Factory extends EFactory */ NodeB createNodeB(); + /** + * Returns a new object of class 'Node C'. + * + * @return a new object of class 'Node C'. + * @generated + */ + NodeC createNodeC(); + + /** + * Returns a new object of class 'Node D'. + * + * @return a new object of class 'Node D'. + * @generated + */ + NodeD createNodeD(); + /** * Returns the package supported by this factory. * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java index cb11ab92df..6ba25c4e7d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java @@ -192,13 +192,21 @@ public interface Model3Package extends EPackage */ int NODE_A__NAME = 1; + /** + * The feature id for the 'Other Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_A__OTHER_NODES = 2; + /** * The number of structural features of the 'Node A' class. * * @generated * @ordered */ - int NODE_A_FEATURE_COUNT = 2; + int NODE_A_FEATURE_COUNT = 3; /** * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl Node B}' class. + * + * @see org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeC() + * @generated + */ + int NODE_C = 6; + + /** + * The feature id for the 'Children' containment reference list. + * + * @generated + * @ordered + */ + int NODE_C__CHILDREN = 0; + + /** + * The feature id for the 'Parent' container reference. + * + * @generated + * @ordered + */ + int NODE_C__PARENT = 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int NODE_C__NAME = 2; + + /** + * The feature id for the 'Other Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_C__OTHER_NODES = 3; + + /** + * The feature id for the 'Opposite Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_C__OPPOSITE_NODES = 4; + + /** + * The number of structural features of the 'Node C' class. + * + * @generated + * @ordered + */ + int NODE_C_FEATURE_COUNT = 5; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl Node D}' class. + * + * @see org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeD() + * @generated + */ + int NODE_D = 7; + + /** + * The feature id for the 'Children' containment reference list. + * + * @generated + * @ordered + */ + int NODE_D__CHILDREN = 0; + + /** + * The feature id for the 'Parent' container reference. + * + * @generated + * @ordered + */ + int NODE_D__PARENT = 1; + + /** + * The feature id for the 'Name' attribute. + * + * @generated + * @ordered + */ + int NODE_D__NAME = 2; + + /** + * The feature id for the 'Other Nodes' reference list. + * + * @generated + * @ordered + */ + int NODE_D__OTHER_NODES = 3; + + /** + * The feature id for the 'Opposite Node' reference. + * + * @generated + * @ordered + */ + int NODE_D__OPPOSITE_NODE = 4; + + /** + * The number of structural features of the 'Node D' class. + * + * @generated + * @ordered + */ + int NODE_D_FEATURE_COUNT = 5; + /** * The meta object id for the 'Point' data type. * @@ -250,7 +377,7 @@ public interface Model3Package extends EPackage * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getPoint() * @generated */ - int POINT = 6; + int POINT = 8; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.Class1 Class1}'. + * + * @return the meta object for the reference list 'Other Nodes'. + * @see org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes() + * @see #getNodeA() + * @generated + */ + EReference getNodeA_OtherNodes(); + /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.NodeB Node B}'. @@ -414,6 +552,138 @@ public interface Model3Package extends EPackage */ EAttribute getNodeB_Name(); + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.NodeC Node C}'. + * + * @return the meta object for class 'Node C'. + * @see org.eclipse.emf.cdo.tests.model3.NodeC + * @generated + */ + EClass getNodeC(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}'. + * + * @return the meta object for the containment reference list 'Children'. + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getChildren() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_Children(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent + * Parent}'. + * + * @return the meta object for the container reference 'Parent'. + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getParent() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_Parent(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getName() + * @see #getNodeC() + * @generated + */ + EAttribute getNodeC_Name(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes + * Other Nodes}'. + * + * @return the meta object for the reference list 'Other Nodes'. + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_OtherNodes(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes + * Opposite Nodes}'. + * + * @return the meta object for the reference list 'Opposite Nodes'. + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes() + * @see #getNodeC() + * @generated + */ + EReference getNodeC_OppositeNodes(); + + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.NodeD Node D}'. + * + * @return the meta object for class 'Node D'. + * @see org.eclipse.emf.cdo.tests.model3.NodeD + * @generated + */ + EClass getNodeD(); + + /** + * Returns the meta object for the containment reference list ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}'. + * + * @return the meta object for the containment reference list 'Children'. + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getChildren() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_Children(); + + /** + * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent + * Parent}'. + * + * @return the meta object for the container reference 'Parent'. + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getParent() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_Parent(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getName() + * @see #getNodeD() + * @generated + */ + EAttribute getNodeD_Name(); + + /** + * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes + * Other Nodes}'. + * + * @return the meta object for the reference list 'Other Nodes'. + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_OtherNodes(); + + /** + * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode + * Opposite Node}'. + * + * @return the meta object for the reference 'Opposite Node'. + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode() + * @see #getNodeD() + * @generated + */ + EReference getNodeD_OppositeNode(); + /** * Returns the meta object for data type '{@link org.eclipse.emf.cdo.tests.model3.Point Point}'. @@ -545,6 +815,14 @@ public interface Model3Package extends EPackage */ EAttribute NODE_A__NAME = eINSTANCE.getNodeA_Name(); + /** + * The meta object literal for the 'Other Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_A__OTHER_NODES = eINSTANCE.getNodeA_OtherNodes(); + /** * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl Node B}' class. * @@ -579,6 +857,106 @@ public interface Model3Package extends EPackage */ EAttribute NODE_B__NAME = eINSTANCE.getNodeB_Name(); + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl Node C}' class. + * + * + * @see org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeC() + * @generated + */ + EClass NODE_C = eINSTANCE.getNodeC(); + + /** + * The meta object literal for the 'Children' containment reference list feature. + * + * @generated + */ + EReference NODE_C__CHILDREN = eINSTANCE.getNodeC_Children(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference NODE_C__PARENT = eINSTANCE.getNodeC_Parent(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * @generated + */ + EAttribute NODE_C__NAME = eINSTANCE.getNodeC_Name(); + + /** + * The meta object literal for the 'Other Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_C__OTHER_NODES = eINSTANCE.getNodeC_OtherNodes(); + + /** + * The meta object literal for the 'Opposite Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_C__OPPOSITE_NODES = eINSTANCE.getNodeC_OppositeNodes(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl Node D}' class. + * + * + * @see org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl + * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeD() + * @generated + */ + EClass NODE_D = eINSTANCE.getNodeD(); + + /** + * The meta object literal for the 'Children' containment reference list feature. + * + * @generated + */ + EReference NODE_D__CHILDREN = eINSTANCE.getNodeD_Children(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference NODE_D__PARENT = eINSTANCE.getNodeD_Parent(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * @generated + */ + EAttribute NODE_D__NAME = eINSTANCE.getNodeD_Name(); + + /** + * The meta object literal for the 'Other Nodes' reference list feature. + * + * + * @generated + */ + EReference NODE_D__OTHER_NODES = eINSTANCE.getNodeD_OtherNodes(); + + /** + * The meta object literal for the 'Opposite Node' reference feature. + * + * @generated + */ + EReference NODE_D__OPPOSITE_NODE = eINSTANCE.getNodeD_OppositeNode(); + /** * The meta object literal for the 'Point' data type. * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java index fa60d47253..e719db9c4b 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java @@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EObject; *
    *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getChildren Children}
  • *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes Other Nodes}
  • *
*

* @@ -71,4 +72,20 @@ public interface NodeA extends EObject */ void setName(String value); + /** + * Returns the value of the 'Other Nodes' reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.tests.model3.NodeA}. + *

+ * If the meaning of the 'Other Nodes' reference list isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Other Nodes' reference list. + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeA_OtherNodes() + * @model + * @generated + */ + EList getOtherNodes(); + } // NodeA diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java new file mode 100644 index 0000000000..d2455ef3a8 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Node C'. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes Other Nodes}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes Opposite Nodes}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC() + * @model + * @generated + */ +public interface NodeC extends EObject +{ + /** + * Returns the value of the 'Children' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.tests.model3.NodeC}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}'. + *

+ * If the meaning of the 'Children' containment reference list isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Children' containment reference list. + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_Children() + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getParent + * @model opposite="parent" containment="true" + * @generated + */ + EList getChildren(); + + /** + * Returns the value of the 'Parent' container reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren Children}'. + *

+ * If the meaning of the 'Parent' container reference isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Parent' container reference. + * @see #setParent(NodeC) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_Parent() + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getChildren + * @model opposite="children" transient="false" + * @generated + */ + NodeC getParent(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent Parent}' container + * reference. + * + * @param value + * the new value of the 'Parent' container reference. + * @see #getParent() + * @generated + */ + void setParent(NodeC value); + + /** + * Returns the value of the 'Name' attribute. + *

+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *

+ * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeC#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Other Nodes' reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.tests.model3.NodeC}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes Opposite Nodes}'. + *

+ * If the meaning of the 'Other Nodes' reference list isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Other Nodes' reference list. + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_OtherNodes() + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes + * @model opposite="oppositeNodes" + * @generated + */ + EList getOtherNodes(); + + /** + * Returns the value of the 'Opposite Nodes' reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.tests.model3.NodeC}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes Other Nodes}'. + *

+ * If the meaning of the 'Opposite Nodes' reference list isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Opposite Nodes' reference list. + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC_OppositeNodes() + * @see org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes + * @model opposite="otherNodes" + * @generated + */ + EList getOppositeNodes(); + +} // NodeC diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java new file mode 100644 index 0000000000..4209fe3424 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * A representation of the model object 'Node D'. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes Other Nodes}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD() + * @model + * @generated + */ +public interface NodeD extends EObject +{ + /** + * Returns the value of the 'Children' containment reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.tests.model3.NodeD}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}'. + *

+ * If the meaning of the 'Children' containment reference list isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Children' containment reference list. + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_Children() + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getParent + * @model opposite="parent" containment="true" + * @generated + */ + EList getChildren(); + + /** + * Returns the value of the 'Parent' container reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren Children}'. + *

+ * If the meaning of the 'Parent' container reference isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Parent' container reference. + * @see #setParent(NodeD) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_Parent() + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getChildren + * @model opposite="children" transient="false" + * @generated + */ + NodeD getParent(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent Parent}' container + * reference. + * + * @param value + * the new value of the 'Parent' container reference. + * @see #getParent() + * @generated + */ + void setParent(NodeD value); + + /** + * Returns the value of the 'Name' attribute. + *

+ * If the meaning of the 'Name' attribute isn't clear, there really should be more of a description here... + *

+ * + * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getName Name}' attribute. + * + * @param value + * the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Other Nodes' reference list. The list contents are of type + * {@link org.eclipse.emf.cdo.tests.model3.NodeD}. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}'. + *

+ * If the meaning of the 'Other Nodes' reference list isn't clear, there really should be more of a + * description here... + *

+ * + * + * @return the value of the 'Other Nodes' reference list. + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_OtherNodes() + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode + * @model opposite="oppositeNode" + * @generated + */ + EList getOtherNodes(); + + /** + * Returns the value of the 'Opposite Node' reference. It is bidirectional and its opposite is ' + * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes Other Nodes}'. + *

+ * If the meaning of the 'Opposite Node' reference isn't clear, there really should be more of a description + * here... + *

+ * + * + * @return the value of the 'Opposite Node' reference. + * @see #setOppositeNode(NodeD) + * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD_OppositeNode() + * @see org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes + * @model opposite="otherNodes" + * @generated + */ + NodeD getOppositeNode(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode Opposite Node}' + * reference. + * + * @param value + * the new value of the 'Opposite Node' reference. + * @see #getOppositeNode() + * @generated + */ + void setOppositeNode(NodeD value); + +} // NodeD diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java index 4bc297960c..469503c9ca 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java @@ -16,6 +16,8 @@ import org.eclipse.emf.cdo.tests.model3.Model3Factory; import org.eclipse.emf.cdo.tests.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Point; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -89,6 +91,10 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return createNodeA(); case Model3Package.NODE_B: return createNodeB(); + case Model3Package.NODE_C: + return createNodeC(); + case Model3Package.NODE_D: + return createNodeD(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -194,6 +200,28 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory return nodeB; } + /** + * + * + * @generated + */ + public NodeC createNodeC() + { + NodeCImpl nodeC = new NodeCImpl(); + return nodeC; + } + + /** + * + * + * @generated + */ + public NodeD createNodeD() + { + NodeDImpl nodeD = new NodeDImpl(); + return nodeD; + } + /** * * diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java index eedcbb2d28..ddcb08dd06 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java @@ -16,6 +16,8 @@ import org.eclipse.emf.cdo.tests.model3.Model3Factory; import org.eclipse.emf.cdo.tests.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Point; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -79,6 +81,20 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package */ private EClass nodeBEClass = null; + /** + * + * + * @generated + */ + private EClass nodeCEClass = null; + + /** + * + * + * @generated + */ + private EClass nodeDEClass = null; + /** * * @@ -126,14 +142,11 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public static Model3Package init() { if (isInited) - { return (Model3Package)EPackage.Registry.INSTANCE.getEPackage(Model3Package.eNS_URI); - } // Obtain or create and register package Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model3PackageImpl ? EPackage.Registry.INSTANCE - .get(eNS_URI) - : new Model3PackageImpl()); + .get(eNS_URI) : new Model3PackageImpl()); isInited = true; @@ -271,6 +284,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package return (EAttribute)nodeAEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + public EReference getNodeA_OtherNodes() + { + return (EReference)nodeAEClass.getEStructuralFeatures().get(2); + } + /** * * @@ -311,6 +334,126 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package return (EAttribute)nodeBEClass.getEStructuralFeatures().get(2); } + /** + * + * + * @generated + */ + public EClass getNodeC() + { + return nodeCEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeC_Children() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getNodeC_Parent() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getNodeC_Name() + { + return (EAttribute)nodeCEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getNodeC_OtherNodes() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getNodeC_OppositeNodes() + { + return (EReference)nodeCEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getNodeD() + { + return nodeDEClass; + } + + /** + * + * + * @generated + */ + public EReference getNodeD_Children() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getNodeD_Parent() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getNodeD_Name() + { + return (EAttribute)nodeDEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EReference getNodeD_OtherNodes() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EReference getNodeD_OppositeNode() + { + return (EReference)nodeDEClass.getEStructuralFeatures().get(4); + } + /** * * @@ -347,9 +490,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public void createPackageContents() { if (isCreated) - { return; - } isCreated = true; // Create classes and their features @@ -368,12 +509,27 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package nodeAEClass = createEClass(NODE_A); createEReference(nodeAEClass, NODE_A__CHILDREN); createEAttribute(nodeAEClass, NODE_A__NAME); + createEReference(nodeAEClass, NODE_A__OTHER_NODES); nodeBEClass = createEClass(NODE_B); createEReference(nodeBEClass, NODE_B__CHILDREN); createEReference(nodeBEClass, NODE_B__PARENT); createEAttribute(nodeBEClass, NODE_B__NAME); + nodeCEClass = createEClass(NODE_C); + createEReference(nodeCEClass, NODE_C__CHILDREN); + createEReference(nodeCEClass, NODE_C__PARENT); + createEAttribute(nodeCEClass, NODE_C__NAME); + createEReference(nodeCEClass, NODE_C__OTHER_NODES); + createEReference(nodeCEClass, NODE_C__OPPOSITE_NODES); + + nodeDEClass = createEClass(NODE_D); + createEReference(nodeDEClass, NODE_D__CHILDREN); + createEReference(nodeDEClass, NODE_D__PARENT); + createEAttribute(nodeDEClass, NODE_D__NAME); + createEReference(nodeDEClass, NODE_D__OTHER_NODES); + createEReference(nodeDEClass, NODE_D__OPPOSITE_NODE); + // Create data types pointEDataType = createEDataType(POINT); } @@ -394,9 +550,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package public void initializePackageContents() { if (isInitialized) - { return; - } isInitialized = true; // Initialize package @@ -445,6 +599,9 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package IS_ORDERED); initEAttribute(getNodeA_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeA.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeA_OtherNodes(), this.getNodeA(), null, "otherNodes", null, 0, -1, NodeA.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, + IS_ORDERED); initEClass(nodeBEClass, NodeB.class, "NodeB", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getNodeB_Children(), this.getNodeB(), this.getNodeB_Parent(), "children", null, 0, -1, NodeB.class, @@ -456,6 +613,38 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package initEAttribute(getNodeB_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeB.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(nodeCEClass, NodeC.class, "NodeC", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getNodeC_Children(), this.getNodeC(), this.getNodeC_Parent(), "children", null, 0, -1, NodeC.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getNodeC_Parent(), this.getNodeC(), this.getNodeC_Children(), "parent", null, 0, 1, NodeC.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getNodeC_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeC.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeC_OtherNodes(), this.getNodeC(), this.getNodeC_OppositeNodes(), "otherNodes", null, 0, -1, + NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeC_OppositeNodes(), this.getNodeC(), this.getNodeC_OtherNodes(), "oppositeNodes", null, 0, -1, + NodeC.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(nodeDEClass, NodeD.class, "NodeD", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getNodeD_Children(), this.getNodeD(), this.getNodeD_Parent(), "children", null, 0, -1, NodeD.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_Parent(), this.getNodeD(), this.getNodeD_Children(), "parent", null, 0, 1, NodeD.class, + !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getNodeD_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeD.class, !IS_TRANSIENT, + !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_OtherNodes(), this.getNodeD(), this.getNodeD_OppositeNode(), "otherNodes", null, 0, -1, + NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getNodeD_OppositeNode(), this.getNodeD(), this.getNodeD_OtherNodes(), "oppositeNode", null, 0, 1, + NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize data types initEDataType(pointEDataType, Point.class, "Point", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java index 6390769042..2e1dd9b65c 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java @@ -25,6 +25,7 @@ import org.eclipse.emf.ecore.EClass; *
    *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getChildren Children}
  • *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getOtherNodes Other Nodes}
  • *
*

* @@ -95,4 +96,15 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA eSet(Model3Package.Literals.NODE_A__NAME, newName); } + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOtherNodes() + { + return (EList)eGet(Model3Package.Literals.NODE_A__OTHER_NODES, true); + } + } // NodeAImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java new file mode 100644 index 0000000000..7f179afdf1 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3.impl; + +import org.eclipse.emf.cdo.tests.model3.Model3Package; +import org.eclipse.emf.cdo.tests.model3.NodeC; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Node C'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getChildren Children}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getParent Parent}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOtherNodes Other Nodes}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOppositeNodes Opposite Nodes}
  • + *
+ *

+ * + * @generated + */ +public class NodeCImpl extends CDOObjectImpl implements NodeC +{ + /** + * + * + * @generated + */ + protected NodeCImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.NODE_C; + } + + /** + * + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getChildren() + { + return (EList)eGet(Model3Package.Literals.NODE_C__CHILDREN, true); + } + + /** + * + * + * @generated + */ + public NodeC getParent() + { + return (NodeC)eGet(Model3Package.Literals.NODE_C__PARENT, true); + } + + /** + * + * + * @generated + */ + public void setParent(NodeC newParent) + { + eSet(Model3Package.Literals.NODE_C__PARENT, newParent); + } + + /** + * + * + * @generated + */ + public String getName() + { + return (String)eGet(Model3Package.Literals.NODE_C__NAME, true); + } + + /** + * + * + * @generated + */ + public void setName(String newName) + { + eSet(Model3Package.Literals.NODE_C__NAME, newName); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOtherNodes() + { + return (EList)eGet(Model3Package.Literals.NODE_C__OTHER_NODES, true); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOppositeNodes() + { + return (EList)eGet(Model3Package.Literals.NODE_C__OPPOSITE_NODES, true); + } + +} // NodeCImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java new file mode 100644 index 0000000000..4e90a8c9cc --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java @@ -0,0 +1,152 @@ +/** + * Copyright (c) 2004 - 2010 Eike Stepper (Berlin, Germany) and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.emf.cdo.tests.model3.impl; + +import org.eclipse.emf.cdo.tests.model3.Model3Package; +import org.eclipse.emf.cdo.tests.model3.NodeD; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; + +/** + * An implementation of the model object 'Node D'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getChildren Children}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getParent Parent}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getName Name}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOtherNodes Other Nodes}
  • + *
  • {@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOppositeNode Opposite Node}
  • + *
+ *

+ * + * @generated + */ +public class NodeDImpl extends CDOObjectImpl implements NodeD +{ + /** + * + * + * @generated + */ + protected NodeDImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model3Package.Literals.NODE_D; + } + + /** + * + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getChildren() + { + return (EList)eGet(Model3Package.Literals.NODE_D__CHILDREN, true); + } + + /** + * + * + * @generated + */ + public NodeD getParent() + { + return (NodeD)eGet(Model3Package.Literals.NODE_D__PARENT, true); + } + + /** + * + * + * @generated + */ + public void setParent(NodeD newParent) + { + eSet(Model3Package.Literals.NODE_D__PARENT, newParent); + } + + /** + * + * + * @generated + */ + public String getName() + { + return (String)eGet(Model3Package.Literals.NODE_D__NAME, true); + } + + /** + * + * + * @generated + */ + public void setName(String newName) + { + eSet(Model3Package.Literals.NODE_D__NAME, newName); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getOtherNodes() + { + return (EList)eGet(Model3Package.Literals.NODE_D__OTHER_NODES, true); + } + + /** + * + * + * @generated + */ + public NodeD getOppositeNode() + { + return (NodeD)eGet(Model3Package.Literals.NODE_D__OPPOSITE_NODE, true); + } + + /** + * + * + * @generated + */ + public void setOppositeNode(NodeD newOppositeNode) + { + eSet(Model3Package.Literals.NODE_D__OPPOSITE_NODE, newOppositeNode); + } + +} // NodeDImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java index 946cba6e12..aca6da147e 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java @@ -76,14 +76,11 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac public static SubpackagePackage init() { if (isInited) - { return (SubpackagePackage)EPackage.Registry.INSTANCE.getEPackage(SubpackagePackage.eNS_URI); - } // Obtain or create and register package SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SubpackagePackageImpl ? EPackage.Registry.INSTANCE - .get(eNS_URI) - : new SubpackagePackageImpl()); + .get(eNS_URI) : new SubpackagePackageImpl()); isInited = true; @@ -157,9 +154,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac public void createPackageContents() { if (isCreated) - { return; - } isCreated = true; // Create classes and their features @@ -183,9 +178,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac public void initializePackageContents() { if (isInitialized) - { return; - } isInitialized = true; // Initialize package diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java index 85810e7186..868ca1f276 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java @@ -97,9 +97,7 @@ public class SubpackageSwitch Class2 class2 = (Class2)theEObject; T result = caseClass2(class2); if (result == null) - { result = defaultCase(theEObject); - } return result; } default: diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java index 1ff7a28b37..fa26d8382d 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java @@ -15,6 +15,8 @@ import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -117,6 +119,18 @@ public class Model3AdapterFactory extends AdapterFactoryImpl return createNodeBAdapter(); } + @Override + public Adapter caseNodeC(NodeC object) + { + return createNodeCAdapter(); + } + + @Override + public Adapter caseNodeD(NodeD object) + { + return createNodeDAdapter(); + } + @Override public Adapter defaultCase(EObject object) { @@ -223,6 +237,34 @@ public class Model3AdapterFactory extends AdapterFactoryImpl return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.NodeC Node C}'. This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model3.NodeC + * @generated + */ + public Adapter createNodeCAdapter() + { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.NodeD Node D}'. This default implementation returns null so that we can easily ignore cases; it's useful to + * ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model3.NodeD + * @generated + */ + public Adapter createNodeDAdapter() + { + return null; + } + /** * Creates a new adapter for the default case. This default implementation returns null. diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java index 5a6aab4955..f6b41bcd30 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java @@ -15,6 +15,8 @@ import org.eclipse.emf.cdo.tests.model3.MetaRef; import org.eclipse.emf.cdo.tests.model3.Model3Package; import org.eclipse.emf.cdo.tests.model3.NodeA; import org.eclipse.emf.cdo.tests.model3.NodeB; +import org.eclipse.emf.cdo.tests.model3.NodeC; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.tests.model3.Polygon; import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates; @@ -102,9 +104,7 @@ public class Model3Switch Class1 class1 = (Class1)theEObject; T result = caseClass1(class1); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.META_REF: @@ -112,9 +112,7 @@ public class Model3Switch MetaRef metaRef = (MetaRef)theEObject; T result = caseMetaRef(metaRef); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.POLYGON: @@ -122,9 +120,7 @@ public class Model3Switch Polygon polygon = (Polygon)theEObject; T result = casePolygon(polygon); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.POLYGON_WITH_DUPLICATES: @@ -132,9 +128,7 @@ public class Model3Switch PolygonWithDuplicates polygonWithDuplicates = (PolygonWithDuplicates)theEObject; T result = casePolygonWithDuplicates(polygonWithDuplicates); if (result == null) - { result = defaultCase(theEObject); - } return result; } case Model3Package.NODE_A: @@ -153,6 +147,22 @@ public class Model3Switch result = defaultCase(theEObject); return result; } + case Model3Package.NODE_C: + { + NodeC nodeC = (NodeC)theEObject; + T result = caseNodeC(nodeC); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case Model3Package.NODE_D: + { + NodeD nodeD = (NodeD)theEObject; + T result = caseNodeD(nodeD); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } @@ -249,6 +259,36 @@ public class Model3Switch return null; } + /** + * Returns the result of interpreting the object as an instance of 'Node C'. This + * implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Node C'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeC(NodeC object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Node D'. This + * implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Node D'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNodeD(NodeD object) + { + return null; + } + /** * Returns the result of interpreting the object as an instance of 'EObject'. This * implementation returns null; returning a non-null result will terminate the switch, but this is the last case diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java index f7ba6f4eaa..b4ec1ea968 100644 --- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java @@ -16,10 +16,12 @@ import org.eclipse.emf.cdo.common.revision.CDORevision; import org.eclipse.emf.cdo.common.revision.CDORevisionUtil; import org.eclipse.emf.cdo.common.revision.delta.CDOAddFeatureDelta; import org.eclipse.emf.cdo.common.revision.delta.CDOClearFeatureDelta; +import org.eclipse.emf.cdo.common.revision.delta.CDOListFeatureDelta; import org.eclipse.emf.cdo.common.revision.delta.CDORevisionDelta; import org.eclipse.emf.cdo.common.revision.delta.CDOSetFeatureDelta; import org.eclipse.emf.cdo.eresource.CDOResource; import org.eclipse.emf.cdo.internal.common.revision.delta.CDOListFeatureDeltaImpl; +import org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisionDeltaImpl; import org.eclipse.emf.cdo.internal.server.mem.MEMStore; import org.eclipse.emf.cdo.server.IStore; import org.eclipse.emf.cdo.session.CDOSession; @@ -29,6 +31,7 @@ import org.eclipse.emf.cdo.tests.model1.Category; import org.eclipse.emf.cdo.tests.model1.Company; import org.eclipse.emf.cdo.tests.model1.Customer; import org.eclipse.emf.cdo.tests.model1.SalesOrder; +import org.eclipse.emf.cdo.tests.model3.NodeD; import org.eclipse.emf.cdo.transaction.CDOTransaction; import org.eclipse.emf.cdo.util.CDOUtil; import org.eclipse.emf.cdo.util.CommitException; @@ -235,6 +238,92 @@ public class RevisionDeltaTest extends AbstractCDOTest session.close(); } + @SuppressWarnings("unused") + public void testDetachWithXRef() throws Exception + { + CDOSession session = openSession(); + CDOTransaction transaction = session.openTransaction(); + CDOResource resource = transaction.createResource("/test1"); + + NodeD a = getModel3Factory().createNodeD(); + NodeD b = getModel3Factory().createNodeD(); + NodeD c = getModel3Factory().createNodeD(); + + a.getChildren().add(b); + c.getOtherNodes().add(b); + + resource.getContents().add(a); + resource.getContents().add(c); + + if (true) + { + transaction.commit(); + transaction.close(); + transaction = session.openTransaction(); + resource = transaction.getResource("/test1"); + } + + // Start test logic + + a = (NodeD)resource.getContents().get(0); + b = a.getChildren().get(0); + c = (NodeD)resource.getContents().get(1); + + a.getChildren().remove(0); + Object[] cB = c.getOtherNodes().toArray(); + + CDORevisionDelta aDelta = transaction.getRevisionDeltas().get(CDOUtil.getCDOObject(a).cdoID()); + CDORevisionDelta cDelta = transaction.getRevisionDeltas().get(CDOUtil.getCDOObject(c).cdoID()); + + session.close(); + } + + @SuppressWarnings("unused") + public void testDetachWithXRef_Remove() throws Exception + { + CDOSession session = openSession(); + CDOTransaction transaction = session.openTransaction(); + CDOResource resource = transaction.createResource("/test1"); + + NodeD a = getModel3Factory().createNodeD(); + NodeD b = getModel3Factory().createNodeD(); + NodeD c = getModel3Factory().createNodeD(); + + a.getChildren().add(b); + c.getOtherNodes().add(b); + + resource.getContents().add(a); + resource.getContents().add(c); + + if (true) + { + transaction.commit(); + transaction.close(); + transaction = session.openTransaction(); + resource = transaction.getResource("/test1"); + } + + // Start test logic + + a = (NodeD)resource.getContents().get(0); + b = a.getChildren().get(0); + c = (NodeD)resource.getContents().get(1); + + a.getChildren().remove(0); + c.getOtherNodes().remove(0); + + Object[] cB = c.getOtherNodes().toArray(); + + CDORevisionDelta aDelta = transaction.getRevisionDeltas().get(CDOUtil.getCDOObject(a).cdoID()); + CDORevisionDelta cDelta = transaction.getRevisionDeltas().get(CDOUtil.getCDOObject(c).cdoID()); + + CDORevisionDeltaImpl cDelta2 = (CDORevisionDeltaImpl)cDelta; + CDOListFeatureDelta list = (CDOListFeatureDelta)cDelta2.getFeatureDelta(getModel3Package().getNodeD_OtherNodes()); + assertEquals(1, list.getListChanges().size()); + + session.close(); + } + public void testListRemoveMiddle() { testStoreDelta(new ListManipulator() -- cgit v1.2.3