summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2010-08-16 06:03:39 (EDT)
committerCaspar De Groot2010-08-16 06:03:39 (EDT)
commit7a7bef31452e23f006f9233e24789e2c8a85ba2e (patch)
treed11998f61fb76d2d7025b847dde17bf54c11703c
parent66de880f109fdf3d07c41f1b757fc5da42dde3c8 (diff)
downloadcdo-7a7bef31452e23f006f9233e24789e2c8a85ba2e.zip
cdo-7a7bef31452e23f006f9233e24789e2c8a85ba2e.tar.gz
cdo-7a7bef31452e23f006f9233e24789e2c8a85ba2e.tar.bz2
[322742] List delta problem: SET plus REMOVE results in nothing
https://bugs.eclipse.org/bugs/show_bug.cgi?id=322742
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore24
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Factory.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/Model3Package.java385
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3FactoryImpl.java28
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java220
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java37
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeCImpl.java424
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeDImpl.java490
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3AdapterFactory.java42
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java56
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java382
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeC.java144
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeD.java155
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java28
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java205
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeCImpl.java143
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeDImpl.java152
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java42
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java56
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RevisionDeltaTest.java89
34 files changed, 3141 insertions, 84 deletions
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 ceb0fb1..e49a93e 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 5ec2cb7..a008856 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<CDOFeatureDelta> getFeatureDeltas()
{
return new ArrayList<CDOFeatureDelta>(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 b7e3a9b..be79a7e 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 0c28dc8..0fc468f 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 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//NodeA" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="otherNodes" upperBound="-1"
+ eType="#//NodeA"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NodeB">
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
@@ -31,6 +33,28 @@
eOpposite="#//NodeB/children"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NodeC">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
+ eType="#//NodeC" containment="true" eOpposite="#//NodeC/parent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//NodeC"
+ eOpposite="#//NodeC/children"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="otherNodes" upperBound="-1"
+ eType="#//NodeC" eOpposite="#//NodeC/oppositeNodes"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="oppositeNodes" upperBound="-1"
+ eType="#//NodeC" eOpposite="#//NodeC/otherNodes"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NodeD">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
+ eType="#//NodeD" containment="true" eOpposite="#//NodeD/parent"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//NodeD"
+ eOpposite="#//NodeD/children"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="otherNodes" upperBound="-1"
+ eType="#//NodeD" eOpposite="#//NodeD/oppositeNode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="oppositeNode" eType="#//NodeD"
+ eOpposite="#//NodeD/otherNodes"/>
+ </eClassifiers>
<eSubpackages name="subpackage" nsURI="http://www.eclipse.org/emf/CDO/tests/subpackage/1.0.0"
nsPrefix="subpackage">
<eClassifiers xsi:type="ecore:EClass" name="Class2">
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 a6c7124..5913fe3 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;
@@ -82,6 +84,22 @@ public interface Model3Factory extends org.eclipse.emf.cdo.tests.model3.Model3Fa
NodeB createNodeB();
/**
+ * Returns a new object of class '<em>Node C</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Node C</em>'.
+ * @generated
+ */
+ NodeC createNodeC();
+
+ /**
+ * Returns a new object of class '<em>Node D</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Node D</em>'.
+ * @generated
+ */
+ NodeD createNodeD();
+
+ /**
* Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return 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 ac4338d..1640dad 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
@@ -192,12 +192,20 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa
int NODE_A__NAME = 1;
/**
+ * The feature id for the '<em><b>Other Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_A__OTHER_NODES = 2;
+
+ /**
* The number of structural features of the '<em>Node A</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @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 <em>Node B</em>}' class.
@@ -243,13 +251,132 @@ 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 <em>Node C</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__CHILDREN = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__PARENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__NAME = 2;
+
+ /**
+ * The feature id for the '<em><b>Other Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__OTHER_NODES = 3;
+
+ /**
+ * The feature id for the '<em><b>Opposite Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__OPPOSITE_NODES = 4;
+
+ /**
+ * The number of structural features of the '<em>Node C</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C_FEATURE_COUNT = 5;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl <em>Node D</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__CHILDREN = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__PARENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__NAME = 2;
+
+ /**
+ * The feature id for the '<em><b>Other Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__OTHER_NODES = 3;
+
+ /**
+ * The feature id for the '<em><b>Opposite Node</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__OPPOSITE_NODE = 4;
+
+ /**
+ * The number of structural features of the '<em>Node D</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D_FEATURE_COUNT = 5;
+
+ /**
* The meta object id for the '<em>Point</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see org.eclipse.emf.cdo.tests.model3.Point
* @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 <em>Class1</em>}'. <!--
@@ -370,6 +497,17 @@ public interface Model3Package extends org.eclipse.emf.cdo.tests.model3.Model3Pa
EAttribute getNodeA_Name();
/**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeA#getOtherNodes
+ * <em>Other Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Other Nodes</em>'.
+ * @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 <em>Node B</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -415,6 +553,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 <em>Node C</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Node C</em>'.
+ * @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 <em>Children</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @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 <em>Parent</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @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
+ * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @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
+ * <em>Other Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Other Nodes</em>'.
+ * @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 <em>Opposite Nodes</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Opposite Nodes</em>'.
+ * @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 <em>Node D</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Node D</em>'.
+ * @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 <em>Children</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @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 <em>Parent</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @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
+ * <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @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
+ * <em>Other Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Other Nodes</em>'.
+ * @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
+ * <em>Opposite Node</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Opposite Node</em>'.
+ * @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 <em>Point</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -546,6 +819,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 '<em><b>Other Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @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 <em>Node B</em>}'
* class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -580,6 +861,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 <em>Node C</em>}'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_C__CHILDREN = eINSTANCE.getNodeC_Children();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' container reference feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_C__PARENT = eINSTANCE.getNodeC_Parent();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute NODE_C__NAME = eINSTANCE.getNodeC_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Other Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_C__OTHER_NODES = eINSTANCE.getNodeC_OtherNodes();
+
+ /**
+ * The meta object literal for the '<em><b>Opposite Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @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 <em>Node D</em>}'
+ * class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__CHILDREN = eINSTANCE.getNodeD_Children();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' container reference feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__PARENT = eINSTANCE.getNodeD_Parent();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute NODE_D__NAME = eINSTANCE.getNodeD_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Other Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__OTHER_NODES = eINSTANCE.getNodeD_OtherNodes();
+
+ /**
+ * The meta object literal for the '<em><b>Opposite Node</b></em>' reference feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__OPPOSITE_NODE = eINSTANCE.getNodeD_OppositeNode();
+
+ /**
* The meta object literal for the '<em>Point</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see org.eclipse.emf.cdo.tests.model3.Point
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 60637a1..6837d39 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 f5ead76..34596e5 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 19ae985..a676eec 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");
}
@@ -197,6 +203,28 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
+ * @generated
+ */
+ public NodeC createNodeC()
+ {
+ NodeCImpl nodeC = new NodeCImpl();
+ return nodeC;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeD createNodeD()
+ {
+ NodeDImpl nodeD = new NodeDImpl();
+ return nodeD;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated NOT
*/
public Point createPointFromString(EDataType eDataType, String initialValue)
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 5eaa188..1540a1d 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;
@@ -84,6 +86,20 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ private EClass nodeCEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass nodeDEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
private EDataType pointEDataType = 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;
@@ -276,6 +289,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ public EReference getNodeA_OtherNodes()
+ {
+ return (EReference)nodeAEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EClass getNodeB()
{
return nodeBEClass;
@@ -316,6 +339,126 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ public EClass getNodeC()
+ {
+ return nodeCEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_Children()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_Parent()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getNodeC_Name()
+ {
+ return (EAttribute)nodeCEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_OtherNodes()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_OppositeNodes()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getNodeD()
+ {
+ return nodeDEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_Children()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_Parent()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getNodeD_Name()
+ {
+ return (EAttribute)nodeDEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_OtherNodes()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_OppositeNode()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EDataType getPoint()
{
return pointEDataType;
@@ -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 69559b5..06fb1c8 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;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getOtherNodes <em>Other Nodes</em>}</li>
* </ul>
* </p>
*
@@ -69,6 +71,16 @@ public class NodeAImpl extends EObjectImpl implements NodeA
protected String name = NAME_EDEFAULT;
/**
+ * The cached value of the '{@link #getOtherNodes() <em>Other Nodes</em>}' reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getOtherNodes()
+ * @generated
+ * @ordered
+ */
+ protected EList<NodeA> otherNodes;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
@@ -131,6 +143,20 @@ public class NodeAImpl extends EObjectImpl implements NodeA
*
* @generated
*/
+ public EList<NodeA> getOtherNodes()
+ {
+ if (otherNodes == null)
+ {
+ otherNodes = new EObjectResolvingEList<NodeA>(NodeA.class, this, Model3Package.NODE_A__OTHER_NODES);
+ }
+ return otherNodes;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
@@ -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<? extends NodeA>)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 0000000..d2e5c68
--- /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;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Node C</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOtherNodes <em>Other Nodes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeCImpl#getOppositeNodes <em>Opposite Nodes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeCImpl extends EObjectImpl implements NodeC
+{
+ /**
+ * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #getChildren()
+ * @generated
+ * @ordered
+ */
+ protected EList<NodeC> children;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getOtherNodes() <em>Other Nodes</em>}' reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getOtherNodes()
+ * @generated
+ * @ordered
+ */
+ protected EList<NodeC> otherNodes;
+
+ /**
+ * The cached value of the '{@link #getOppositeNodes() <em>Opposite Nodes</em>}' reference list. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #getOppositeNodes()
+ * @generated
+ * @ordered
+ */
+ protected EList<NodeC> oppositeNodes;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NodeCImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model3Package.Literals.NODE_C;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<NodeC> getChildren()
+ {
+ if (children == null)
+ {
+ children = new EObjectContainmentWithInverseEList<NodeC>(NodeC.class, this, Model3Package.NODE_C__CHILDREN,
+ Model3Package.NODE_C__PARENT);
+ }
+ return children;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeC getParent()
+ {
+ if (eContainerFeatureID() != Model3Package.NODE_C__PARENT)
+ return null;
+ return (NodeC)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetParent(NodeC newParent, NotificationChain msgs)
+ {
+ msgs = eBasicSetContainer((InternalEObject)newParent, Model3Package.NODE_C__PARENT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<NodeC> getOtherNodes()
+ {
+ if (otherNodes == null)
+ {
+ otherNodes = new EObjectWithInverseResolvingEList.ManyInverse<NodeC>(NodeC.class, this,
+ Model3Package.NODE_C__OTHER_NODES, Model3Package.NODE_C__OPPOSITE_NODES);
+ }
+ return otherNodes;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<NodeC> getOppositeNodes()
+ {
+ if (oppositeNodes == null)
+ {
+ oppositeNodes = new EObjectWithInverseResolvingEList.ManyInverse<NodeC>(NodeC.class, this,
+ Model3Package.NODE_C__OPPOSITE_NODES, Model3Package.NODE_C__OTHER_NODES);
+ }
+ return oppositeNodes;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case Model3Package.NODE_C__CHILDREN:
+ return ((InternalEList<InternalEObject>)(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<InternalEObject>)(InternalEList<?>)getOtherNodes()).basicAdd(otherEnd, msgs);
+ case Model3Package.NODE_C__OPPOSITE_NODES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getOppositeNodes()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case Model3Package.NODE_C__CHILDREN:
+ getChildren().clear();
+ getChildren().addAll((Collection<? extends NodeC>)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<? extends NodeC>)newValue);
+ return;
+ case Model3Package.NODE_C__OPPOSITE_NODES:
+ getOppositeNodes().clear();
+ getOppositeNodes().addAll((Collection<? extends NodeC>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 0000000..c40b36f
--- /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;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Node D</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOtherNodes <em>Other Nodes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeDImpl#getOppositeNode <em>Opposite Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeDImpl extends EObjectImpl implements NodeD
+{
+ /**
+ * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @see #getChildren()
+ * @generated
+ * @ordered
+ */
+ protected EList<NodeD> children;
+
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getOtherNodes() <em>Other Nodes</em>}' reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getOtherNodes()
+ * @generated
+ * @ordered
+ */
+ protected EList<NodeD> otherNodes;
+
+ /**
+ * The cached value of the '{@link #getOppositeNode() <em>Opposite Node</em>}' reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getOppositeNode()
+ * @generated
+ * @ordered
+ */
+ protected NodeD oppositeNode;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NodeDImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model3Package.Literals.NODE_D;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<NodeD> getChildren()
+ {
+ if (children == null)
+ {
+ children = new EObjectContainmentWithInverseEList<NodeD>(NodeD.class, this, Model3Package.NODE_D__CHILDREN,
+ Model3Package.NODE_D__PARENT);
+ }
+ return children;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeD getParent()
+ {
+ if (eContainerFeatureID() != Model3Package.NODE_D__PARENT)
+ return null;
+ return (NodeD)eContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetParent(NodeD newParent, NotificationChain msgs)
+ {
+ msgs = eBasicSetContainer((InternalEObject)newParent, Model3Package.NODE_D__PARENT, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<NodeD> getOtherNodes()
+ {
+ if (otherNodes == null)
+ {
+ otherNodes = new EObjectWithInverseResolvingEList<NodeD>(NodeD.class, this, Model3Package.NODE_D__OTHER_NODES,
+ Model3Package.NODE_D__OPPOSITE_NODE);
+ }
+ return otherNodes;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeD basicGetOppositeNode()
+ {
+ return oppositeNode;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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));
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
+ {
+ switch (featureID)
+ {
+ case Model3Package.NODE_D__CHILDREN:
+ return ((InternalEList<InternalEObject>)(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<InternalEObject>)(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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case Model3Package.NODE_D__CHILDREN:
+ getChildren().clear();
+ getChildren().addAll((Collection<? extends NodeD>)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<? extends NodeD>)newValue);
+ return;
+ case Model3Package.NODE_D__OPPOSITE_NODE:
+ setOppositeNode((NodeD)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 daa4a6f..db6b4af 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 38dfd4a..9d066d9 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 660011c..1c3f85c 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 0998561..173208b 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<T>
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 a84ab31..97da57b 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;
@@ -118,6 +120,18 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseNodeC(NodeC object)
+ {
+ return createNodeCAdapter();
+ }
+
+ @Override
+ public Adapter caseNodeD(NodeD object)
+ {
+ return createNodeDAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -224,6 +238,34 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model3.NodeC <em>Node C</em>}
+ * '. <!-- begin-user-doc --> 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. <!-- end-user-doc -->
+ *
+ * @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 <em>Node D</em>}
+ * '. <!-- begin-user-doc --> 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. <!-- end-user-doc -->
+ *
+ * @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. <!-- begin-user-doc --> This default implementation returns null. <!--
* end-user-doc -->
*
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 d4a8d9e..0ab8e39 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<T>
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<T>
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<T>
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<T>
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<T>
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);
}
@@ -250,6 +260,36 @@ public class Model3Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Node C</em>'. <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Node C</em>'.
+ * @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 '<em>Node D</em>'. <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Node D</em>'.
+ * @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 '<em>EObject</em>'. <!-- begin-user-doc --> This
* implementation returns null; returning a non-null result will terminate the switch, but this is the last case
* anyway. <!-- end-user-doc -->
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 e50d60a..7865ee7 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
@@ -77,6 +77,22 @@ public interface Model3Factory extends EFactory
NodeB createNodeB();
/**
+ * Returns a new object of class '<em>Node C</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Node C</em>'.
+ * @generated
+ */
+ NodeC createNodeC();
+
+ /**
+ * Returns a new object of class '<em>Node D</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Node D</em>'.
+ * @generated
+ */
+ NodeD createNodeD();
+
+ /**
* Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return 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 cb11ab9..6ba25c4 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
@@ -193,12 +193,20 @@ public interface Model3Package extends EPackage
int NODE_A__NAME = 1;
/**
+ * The feature id for the '<em><b>Other Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_A__OTHER_NODES = 2;
+
+ /**
* The number of structural features of the '<em>Node A</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @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 <em>Node B</em>}' class. <!--
@@ -244,13 +252,132 @@ public interface Model3Package extends EPackage
int NODE_B_FEATURE_COUNT = 3;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl <em>Node C</em>}' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__CHILDREN = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__PARENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__NAME = 2;
+
+ /**
+ * The feature id for the '<em><b>Other Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__OTHER_NODES = 3;
+
+ /**
+ * The feature id for the '<em><b>Opposite Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C__OPPOSITE_NODES = 4;
+
+ /**
+ * The number of structural features of the '<em>Node C</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_C_FEATURE_COUNT = 5;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl <em>Node D</em>}' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__CHILDREN = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__PARENT = 1;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__NAME = 2;
+
+ /**
+ * The feature id for the '<em><b>Other Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__OTHER_NODES = 3;
+
+ /**
+ * The feature id for the '<em><b>Opposite Node</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D__OPPOSITE_NODE = 4;
+
+ /**
+ * The number of structural features of the '<em>Node D</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_D_FEATURE_COUNT = 5;
+
+ /**
* The meta object id for the '<em>Point</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see org.eclipse.emf.cdo.tests.model3.Point
* @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 <em>Class1</em>}'. <!--
@@ -371,6 +498,17 @@ public interface Model3Package extends EPackage
EAttribute getNodeA_Name();
/**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes
+ * <em>Other Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Other Nodes</em>'.
+ * @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 <em>Node B</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -415,6 +553,138 @@ public interface Model3Package extends EPackage
EAttribute getNodeB_Name();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.NodeC <em>Node C</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Node C</em>'.
+ * @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 <em>Children</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @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
+ * <em>Parent</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @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 <em>Name</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @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
+ * <em>Other Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Other Nodes</em>'.
+ * @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
+ * <em>Opposite Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Opposite Nodes</em>'.
+ * @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 <em>Node D</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Node D</em>'.
+ * @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 <em>Children</em>}'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @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
+ * <em>Parent</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @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 <em>Name</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @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
+ * <em>Other Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Other Nodes</em>'.
+ * @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
+ * <em>Opposite Node</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Opposite Node</em>'.
+ * @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 <em>Point</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -546,6 +816,14 @@ public interface Model3Package extends EPackage
EAttribute NODE_A__NAME = eINSTANCE.getNodeA_Name();
/**
+ * The meta object literal for the '<em><b>Other Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_A__OTHER_NODES = eINSTANCE.getNodeA_OtherNodes();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl <em>Node B</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -580,6 +858,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 <em>Node C</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_C__CHILDREN = eINSTANCE.getNodeC_Children();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' container reference feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_C__PARENT = eINSTANCE.getNodeC_Parent();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute NODE_C__NAME = eINSTANCE.getNodeC_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Other Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_C__OTHER_NODES = eINSTANCE.getNodeC_OtherNodes();
+
+ /**
+ * The meta object literal for the '<em><b>Opposite Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_C__OPPOSITE_NODES = eINSTANCE.getNodeC_OppositeNodes();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl <em>Node D</em>}' class.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 '<em><b>Children</b></em>' containment reference list feature. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__CHILDREN = eINSTANCE.getNodeD_Children();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' container reference feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__PARENT = eINSTANCE.getNodeD_Parent();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute NODE_D__NAME = eINSTANCE.getNodeD_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Other Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__OTHER_NODES = eINSTANCE.getNodeD_OtherNodes();
+
+ /**
+ * The meta object literal for the '<em><b>Opposite Node</b></em>' reference feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_D__OPPOSITE_NODE = eINSTANCE.getNodeD_OppositeNode();
+
+ /**
* The meta object literal for the '<em>Point</em>' data type. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @see org.eclipse.emf.cdo.tests.model3.Point
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 fa60d47..e719db9 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;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model3.NodeA#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model3.NodeA#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes <em>Other Nodes</em>}</li>
* </ul>
* </p>
*
@@ -71,4 +72,20 @@ public interface NodeA extends EObject
*/
void setName(String value);
+ /**
+ * Returns the value of the '<em><b>Other Nodes</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.emf.cdo.tests.model3.NodeA}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Other Nodes</em>' reference list isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Other Nodes</em>' reference list.
+ * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeA_OtherNodes()
+ * @model
+ * @generated
+ */
+ EList<NodeA> 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 0000000..d2455ef
--- /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;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Node C</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeC#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeC#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOtherNodes <em>Other Nodes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeC#getOppositeNodes <em>Opposite Nodes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeC()
+ * @model
+ * @generated
+ */
+public interface NodeC extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Children</b></em>' 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 <em>Parent</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Children</em>' containment reference list isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Children</em>' 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<NodeC> getChildren();
+
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' container reference. It is bidirectional and its opposite is '
+ * {@link org.eclipse.emf.cdo.tests.model3.NodeC#getChildren <em>Children</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' container reference isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Parent</em>' 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 <em>Parent</em>}' container
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Parent</em>' container reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(NodeC value);
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Name</em>' 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 <em>Name</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Other Nodes</b></em>' 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 <em>Opposite Nodes</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Other Nodes</em>' reference list isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Other Nodes</em>' 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<NodeC> getOtherNodes();
+
+ /**
+ * Returns the value of the '<em><b>Opposite Nodes</b></em>' 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 <em>Other Nodes</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Opposite Nodes</em>' reference list isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Opposite Nodes</em>' 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<NodeC> 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 0000000..4209fe3
--- /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;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Node D</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeD#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeD#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes <em>Other Nodes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeD#getOppositeNode <em>Opposite Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeD()
+ * @model
+ * @generated
+ */
+public interface NodeD extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Children</b></em>' 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 <em>Parent</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Children</em>' containment reference list isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Children</em>' 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<NodeD> getChildren();
+
+ /**
+ * Returns the value of the '<em><b>Parent</b></em>' container reference. It is bidirectional and its opposite is '
+ * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getChildren <em>Children</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' container reference isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Parent</em>' 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 <em>Parent</em>}' container
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Parent</em>' container reference.
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(NodeD value);
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Name</em>' 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 <em>Name</em>}' attribute. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Other Nodes</b></em>' 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 <em>Opposite Node</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Other Nodes</em>' reference list isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Other Nodes</em>' 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<NodeD> getOtherNodes();
+
+ /**
+ * Returns the value of the '<em><b>Opposite Node</b></em>' reference. It is bidirectional and its opposite is '
+ * {@link org.eclipse.emf.cdo.tests.model3.NodeD#getOtherNodes <em>Other Nodes</em>}'. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Opposite Node</em>' reference isn't clear, there really should be more of a description
+ * here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Opposite Node</em>' 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 <em>Opposite Node</em>}'
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Opposite Node</em>' 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 4bc2979..469503c 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");
}
@@ -197,6 +203,28 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
+ * @generated
+ */
+ public NodeC createNodeC()
+ {
+ NodeCImpl nodeC = new NodeCImpl();
+ return nodeC;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeD createNodeD()
+ {
+ NodeDImpl nodeD = new NodeDImpl();
+ return nodeD;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated NOT
*/
public Point createPointFromString(EDataType eDataType, String initialValue)
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 eedcbb2..ddcb08d 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;
@@ -84,6 +86,20 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ private EClass nodeCEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass nodeDEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
private EDataType pointEDataType = 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;
@@ -276,6 +289,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ public EReference getNodeA_OtherNodes()
+ {
+ return (EReference)nodeAEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EClass getNodeB()
{
return nodeBEClass;
@@ -316,6 +339,126 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ public EClass getNodeC()
+ {
+ return nodeCEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_Children()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_Parent()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getNodeC_Name()
+ {
+ return (EAttribute)nodeCEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_OtherNodes()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeC_OppositeNodes()
+ {
+ return (EReference)nodeCEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getNodeD()
+ {
+ return nodeDEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_Children()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_Parent()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getNodeD_Name()
+ {
+ return (EAttribute)nodeDEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_OtherNodes()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getNodeD_OppositeNode()
+ {
+ return (EReference)nodeDEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EDataType getPoint()
{
return pointEDataType;
@@ -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 6390769..2e1dd9b 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;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getOtherNodes <em>Other Nodes</em>}</li>
* </ul>
* </p>
*
@@ -95,4 +96,15 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA
eSet(Model3Package.Literals.NODE_A__NAME, newName);
}
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeA> getOtherNodes()
+ {
+ return (EList<NodeA>)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 0000000..7f179af
--- /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;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Node C</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOtherNodes <em>Other Nodes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeCImpl#getOppositeNodes <em>Opposite Nodes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeCImpl extends CDOObjectImpl implements NodeC
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NodeCImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model3Package.Literals.NODE_C;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeC> getChildren()
+ {
+ return (EList<NodeC>)eGet(Model3Package.Literals.NODE_C__CHILDREN, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeC getParent()
+ {
+ return (NodeC)eGet(Model3Package.Literals.NODE_C__PARENT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setParent(NodeC newParent)
+ {
+ eSet(Model3Package.Literals.NODE_C__PARENT, newParent);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(Model3Package.Literals.NODE_C__NAME, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(Model3Package.Literals.NODE_C__NAME, newName);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeC> getOtherNodes()
+ {
+ return (EList<NodeC>)eGet(Model3Package.Literals.NODE_C__OTHER_NODES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeC> getOppositeNodes()
+ {
+ return (EList<NodeC>)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 0000000..4e90a8c
--- /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;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Node D</b></em>'. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getChildren <em>Children</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getParent <em>Parent</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOtherNodes <em>Other Nodes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeDImpl#getOppositeNode <em>Opposite Node</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeDImpl extends CDOObjectImpl implements NodeD
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected NodeDImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model3Package.Literals.NODE_D;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeD> getChildren()
+ {
+ return (EList<NodeD>)eGet(Model3Package.Literals.NODE_D__CHILDREN, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeD getParent()
+ {
+ return (NodeD)eGet(Model3Package.Literals.NODE_D__PARENT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setParent(NodeD newParent)
+ {
+ eSet(Model3Package.Literals.NODE_D__PARENT, newParent);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(Model3Package.Literals.NODE_D__NAME, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(Model3Package.Literals.NODE_D__NAME, newName);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeD> getOtherNodes()
+ {
+ return (EList<NodeD>)eGet(Model3Package.Literals.NODE_D__OTHER_NODES, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NodeD getOppositeNode()
+ {
+ return (NodeD)eGet(Model3Package.Literals.NODE_D__OPPOSITE_NODE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @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 946cba6..aca6da1 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 85810e7..868ca1f 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<T>
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 1ff7a28..fa26d83 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;
@@ -118,6 +120,18 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseNodeC(NodeC object)
+ {
+ return createNodeCAdapter();
+ }
+
+ @Override
+ public Adapter caseNodeD(NodeD object)
+ {
+ return createNodeDAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -224,6 +238,34 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.NodeC <em>Node C</em>}'. <!--
+ * begin-user-doc --> 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. <!-- end-user-doc -->
+ *
+ * @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 <em>Node D</em>}'. <!--
+ * begin-user-doc --> 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. <!-- end-user-doc -->
+ *
+ * @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. <!-- begin-user-doc --> This default implementation returns null. <!--
* end-user-doc -->
*
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 5a6aab4..f6b41bc 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<T>
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<T>
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<T>
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<T>
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<T>
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);
}
@@ -250,6 +260,36 @@ public class Model3Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Node C</em>'. <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Node C</em>'.
+ * @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 '<em>Node D</em>'. <!-- begin-user-doc --> This
+ * implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
+ *
+ * @param object
+ * the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Node D</em>'.
+ * @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 '<em>EObject</em>'. <!-- begin-user-doc --> This
* implementation returns null; returning a non-null result will terminate the switch, but this is the last case
* anyway. <!-- end-user-doc -->
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 f7ba6f4..b4ec1ea 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()