Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-08-31 09:02:47 -0400
committerEike Stepper2013-08-31 09:02:47 -0400
commit68eaf83fe7e9e187edee65c6f449dc04bdf50f4a (patch)
tree82916da4641d7336fe58dfbe5d5abc90150ee79d
parent5c879443d0193dea11df49e80dbc9d774d6f30e3 (diff)
downloadcdo-68eaf83fe7e9e187edee65c6f449dc04bdf50f4a.tar.gz
cdo-68eaf83fe7e9e187edee65c6f449dc04bdf50f4a.tar.xz
cdo-68eaf83fe7e9e187edee65c6f449dc04bdf50f4a.zip
[416290] [Legacy] ArrayIndexOutOfBoundsException with CDOLegacyWrapper
and CDOIDExternal https://bugs.eclipse.org/bugs/show_bug.cgi?id=416290
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/META-INF/MANIFEST.MF26
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy.genmodel5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Factory.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java101
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeE.java96
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3FactoryImpl.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java63
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeEImpl.java114
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Factory.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Package.java101
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3FactoryImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3PackageImpl.java63
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/NodeEImpl.java286
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3AdapterFactory.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3Switch.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3AdapterFactory.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_414949_Test.java108
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java7
21 files changed, 1093 insertions, 32 deletions
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 ebd06e8e66..2c016e5f75 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.300.qualifier
+Bundle-Version: 3.0.301.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,15 +10,15 @@ Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
org.eclipse.emf.ecore;bundle-version="[2.5.0,3.0.0)";visibility:=reexport,
org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.tests.model3;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.impl;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.legacy;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.legacy.impl;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.legacy.util;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.subpackage;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.subpackage.impl;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.subpackage.legacy;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.subpackage.legacy.impl;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.subpackage.legacy.util;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.subpackage.util;version="3.0.300",
- org.eclipse.emf.cdo.tests.model3.util;version="3.0.300"
+Export-Package: org.eclipse.emf.cdo.tests.model3;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.impl;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.legacy;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.legacy.impl;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.legacy.util;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.subpackage;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.subpackage.impl;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.subpackage.legacy;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.subpackage.legacy.impl;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.subpackage.legacy.util;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.subpackage.util;version="3.0.301",
+ org.eclipse.emf.cdo.tests.model3.util;version="3.0.301"
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 72925d3ea3..545672d895 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore
@@ -60,6 +60,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="oppositeNode" eType="#//NodeD"
eOpposite="#//NodeD/otherNodes"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="NodeE">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="mainNode" eType="#//NodeA"/>
+ <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="Image">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="width" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="height" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel
index a2f91c4dac..9659786528 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.genmodel
@@ -49,6 +49,11 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeD/otherNodes"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeD/oppositeNode"/>
</genClasses>
+ <genClasses ecoreClass="model3.ecore#//NodeE">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeE/mainNode"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model3.ecore#//NodeE/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeE/otherNodes"/>
+ </genClasses>
<genClasses ecoreClass="model3.ecore#//Image">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model3.ecore#//Image/width"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model3.ecore#//Image/height"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy.genmodel b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy.genmodel
index ab9199ff8f..4f99d972dd 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.legacy.genmodel
@@ -48,6 +48,11 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeD/otherNodes"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeD/oppositeNode"/>
</genClasses>
+ <genClasses ecoreClass="model3.ecore#//NodeE">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeE/mainNode"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model3.ecore#//NodeE/name"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model3.ecore#//NodeE/otherNodes"/>
+ </genClasses>
<genClasses ecoreClass="model3.ecore#//Image">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model3.ecore#//Image/width"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model3.ecore#//Image/height"/>
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 2fa68e2535..112d1ccb1a 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
@@ -92,6 +92,15 @@ public interface Model3Factory extends EFactory
NodeD createNodeD();
/**
+ * Returns a new object of class '<em>Node E</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Node E</em>'.
+ * @generated
+ */
+ NodeE createNodeE();
+
+ /**
* Returns a new object of class '<em>Image</em>'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Image</em>'.
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 17bb79321f..c7ae7c7196 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
@@ -384,6 +384,52 @@ public interface Model3Package extends EPackage
int NODE_D_FEATURE_COUNT = 5;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeEImpl <em>Node E</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model3.impl.NodeEImpl
+ * @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getNodeE()
+ * @generated
+ */
+ int NODE_E = 8;
+
+ /**
+ * The feature id for the '<em><b>Main Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_E__MAIN_NODE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_E__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_E__OTHER_NODES = 2;
+
+ /**
+ * The number of structural features of the '<em>Node E</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_E_FEATURE_COUNT = 3;
+
+ /**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.ImageImpl <em>Image</em>}' class. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -391,7 +437,7 @@ public interface Model3Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getImage()
* @generated
*/
- int IMAGE = 8;
+ int IMAGE = 9;
/**
* The feature id for the '<em><b>Width</b></em>' attribute.
@@ -433,7 +479,7 @@ public interface Model3Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getFile()
* @generated
*/
- int FILE = 9;
+ int FILE = 10;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@@ -466,7 +512,7 @@ public interface Model3Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getClassWithIDAttribute()
* @generated
*/
- int CLASS_WITH_ID_ATTRIBUTE = 10;
+ int CLASS_WITH_ID_ATTRIBUTE = 11;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
@@ -493,7 +539,7 @@ public interface Model3Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getClassWithJavaClassAttribute()
* @generated
*/
- int CLASS_WITH_JAVA_CLASS_ATTRIBUTE = 11;
+ int CLASS_WITH_JAVA_CLASS_ATTRIBUTE = 12;
/**
* The feature id for the '<em><b>Java Class</b></em>' attribute.
@@ -521,7 +567,7 @@ public interface Model3Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getClassWithJavaObjectAttribute()
* @generated
*/
- int CLASS_WITH_JAVA_OBJECT_ATTRIBUTE = 12;
+ int CLASS_WITH_JAVA_OBJECT_ATTRIBUTE = 13;
/**
* The feature id for the '<em><b>Java Object</b></em>' attribute.
@@ -548,7 +594,7 @@ public interface Model3Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model3.impl.Model3PackageImpl#getPoint()
* @generated
*/
- int POINT = 13;
+ int POINT = 14;
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.Class1 <em>Class1</em>}'. <!--
@@ -855,6 +901,49 @@ public interface Model3Package extends EPackage
EReference getNodeD_OppositeNode();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.NodeE <em>Node E</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Node E</em>'.
+ * @see org.eclipse.emf.cdo.tests.model3.NodeE
+ * @generated
+ */
+ EClass getNodeE();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model3.NodeE#getMainNode <em>Main Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Main Node</em>'.
+ * @see org.eclipse.emf.cdo.tests.model3.NodeE#getMainNode()
+ * @see #getNodeE()
+ * @generated
+ */
+ EReference getNodeE_MainNode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeE#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.NodeE#getName()
+ * @see #getNodeE()
+ * @generated
+ */
+ EAttribute getNodeE_Name();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeE#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.NodeE#getOtherNodes()
+ * @see #getNodeE()
+ * @generated
+ */
+ EReference getNodeE_OtherNodes();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.Image <em>Image</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeE.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeE.java
new file mode 100644
index 0000000000..2fb8103233
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeE.java
@@ -0,0 +1,96 @@
+/**
+ */
+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 E</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeE#getMainNode <em>Main Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeE#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeE#getOtherNodes <em>Other Nodes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeE()
+ * @model
+ * @generated
+ */
+public interface NodeE extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Main Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Main 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>Main Node</em>' reference.
+ * @see #setMainNode(NodeA)
+ * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeE_MainNode()
+ * @model
+ * @generated
+ */
+ NodeA getMainNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeE#getMainNode <em>Main Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Main Node</em>' reference.
+ * @see #getMainNode()
+ * @generated
+ */
+ void setMainNode(NodeA 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#getNodeE_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model3.NodeE#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.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#getNodeE_OtherNodes()
+ * @model
+ * @generated
+ */
+ EList<NodeA> getOtherNodes();
+
+} // NodeE
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 66611ee758..bf84c04317 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
@@ -24,6 +24,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Point;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
@@ -50,8 +51,7 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory
{
try
{
- Model3Factory theModel3Factory = (Model3Factory)EPackage.Registry.INSTANCE
- .getEFactory("http://www.eclipse.org/emf/CDO/tests/model3/1.0.0");
+ Model3Factory theModel3Factory = (Model3Factory)EPackage.Registry.INSTANCE.getEFactory(Model3Package.eNS_URI);
if (theModel3Factory != null)
{
return theModel3Factory;
@@ -99,6 +99,8 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory
return createNodeC();
case Model3Package.NODE_D:
return createNodeD();
+ case Model3Package.NODE_E:
+ return createNodeE();
case Model3Package.IMAGE:
return createImage();
case Model3Package.FILE:
@@ -227,6 +229,17 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeE createNodeE()
+ {
+ NodeEImpl nodeE = new NodeEImpl();
+ return nodeE;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
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 e4f0aa7dda..11281de496 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
@@ -24,6 +24,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Point;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
@@ -94,6 +95,13 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
private EClass nodeDEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass nodeEEClass = null;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -473,6 +481,46 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNodeE()
+ {
+ return nodeEEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNodeE_MainNode()
+ {
+ return (EReference)nodeEEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNodeE_Name()
+ {
+ return (EAttribute)nodeEEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNodeE_OtherNodes()
+ {
+ return (EReference)nodeEEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -668,6 +716,11 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
createEReference(nodeDEClass, NODE_D__OTHER_NODES);
createEReference(nodeDEClass, NODE_D__OPPOSITE_NODE);
+ nodeEEClass = createEClass(NODE_E);
+ createEReference(nodeEEClass, NODE_E__MAIN_NODE);
+ createEAttribute(nodeEEClass, NODE_E__NAME);
+ createEReference(nodeEEClass, NODE_E__OTHER_NODES);
+
imageEClass = createEClass(IMAGE);
createEAttribute(imageEClass, IMAGE__WIDTH);
createEAttribute(imageEClass, IMAGE__HEIGHT);
@@ -807,6 +860,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(nodeEEClass, NodeE.class, "NodeE", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getNodeE_MainNode(), this.getNodeA(), null, "mainNode", null, 0, 1, NodeE.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+ initEAttribute(getNodeE_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeE.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNodeE_OtherNodes(), this.getNodeA(), null, "otherNodes", null, 0, -1, NodeE.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+
initEClass(imageEClass, Image.class, "Image", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getImage_Width(), theEcorePackage.getEInt(), "width", null, 0, 1, Image.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeEImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeEImpl.java
new file mode 100644
index 0000000000..6fac192742
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeEImpl.java
@@ -0,0 +1,114 @@
+/**
+ */
+package org.eclipse.emf.cdo.tests.model3.impl;
+
+import org.eclipse.emf.cdo.tests.model3.Model3Package;
+import org.eclipse.emf.cdo.tests.model3.NodeA;
+import org.eclipse.emf.cdo.tests.model3.NodeE;
+
+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 E</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeEImpl#getMainNode <em>Main Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeEImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeEImpl#getOtherNodes <em>Other Nodes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeEImpl extends CDOObjectImpl implements NodeE
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeEImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model3Package.eINSTANCE.getNodeE();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeA getMainNode()
+ {
+ return (NodeA)eGet(Model3Package.eINSTANCE.getNodeE_MainNode(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMainNode(NodeA newMainNode)
+ {
+ eSet(Model3Package.eINSTANCE.getNodeE_MainNode(), newMainNode);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(Model3Package.eINSTANCE.getNodeE_Name(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(Model3Package.eINSTANCE.getNodeE_Name(), newName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeA> getOtherNodes()
+ {
+ return (EList<NodeA>)eGet(Model3Package.eINSTANCE.getNodeE_OtherNodes(), true);
+ }
+
+} // NodeEImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Factory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Factory.java
index 97be9946d2..820a7c775f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Factory.java
@@ -21,6 +21,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
@@ -108,6 +109,15 @@ public interface Model3Factory extends EFactory, org.eclipse.emf.cdo.tests.model
NodeD createNodeD();
/**
+ * Returns a new object of class '<em>Node E</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Node E</em>'.
+ * @generated
+ */
+ NodeE createNodeE();
+
+ /**
* Returns a new object of class '<em>Image</em>'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return a new object of class '<em>Image</em>'.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Package.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Package.java
index 0892478327..ce8cf194bc 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/Model3Package.java
@@ -379,13 +379,59 @@ public interface Model3Package extends EPackage, org.eclipse.emf.cdo.tests.model
int NODE_D_FEATURE_COUNT = 5;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.legacy.impl.NodeEImpl <em>Node E</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model3.legacy.impl.NodeEImpl
+ * @see org.eclipse.emf.cdo.tests.model3.legacy.impl.Model3PackageImpl#getNodeE()
+ * @generated
+ */
+ int NODE_E = 8;
+
+ /**
+ * The feature id for the '<em><b>Main Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_E__MAIN_NODE = 0;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_E__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_E__OTHER_NODES = 2;
+
+ /**
+ * The number of structural features of the '<em>Node E</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_E_FEATURE_COUNT = 3;
+
+ /**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.legacy.impl.ImageImpl <em>Image</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.model3.legacy.impl.ImageImpl
* @see org.eclipse.emf.cdo.tests.model3.legacy.impl.Model3PackageImpl#getImage()
* @generated
*/
- int IMAGE = 8;
+ int IMAGE = 9;
/**
* The feature id for the '<em><b>Width</b></em>' attribute.
@@ -426,7 +472,7 @@ public interface Model3Package extends EPackage, org.eclipse.emf.cdo.tests.model
* @see org.eclipse.emf.cdo.tests.model3.legacy.impl.Model3PackageImpl#getFile()
* @generated
*/
- int FILE = 9;
+ int FILE = 10;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@@ -459,7 +505,7 @@ public interface Model3Package extends EPackage, org.eclipse.emf.cdo.tests.model
* @see org.eclipse.emf.cdo.tests.model3.legacy.impl.Model3PackageImpl#getClassWithIDAttribute()
* @generated
*/
- int CLASS_WITH_ID_ATTRIBUTE = 10;
+ int CLASS_WITH_ID_ATTRIBUTE = 11;
/**
* The feature id for the '<em><b>Id</b></em>' attribute.
@@ -486,7 +532,7 @@ public interface Model3Package extends EPackage, org.eclipse.emf.cdo.tests.model
* @see org.eclipse.emf.cdo.tests.model3.legacy.impl.Model3PackageImpl#getClassWithJavaClassAttribute()
* @generated
*/
- int CLASS_WITH_JAVA_CLASS_ATTRIBUTE = 11;
+ int CLASS_WITH_JAVA_CLASS_ATTRIBUTE = 12;
/**
* The feature id for the '<em><b>Java Class</b></em>' attribute.
@@ -514,7 +560,7 @@ public interface Model3Package extends EPackage, org.eclipse.emf.cdo.tests.model
* @see org.eclipse.emf.cdo.tests.model3.legacy.impl.Model3PackageImpl#getClassWithJavaObjectAttribute()
* @generated
*/
- int CLASS_WITH_JAVA_OBJECT_ATTRIBUTE = 12;
+ int CLASS_WITH_JAVA_OBJECT_ATTRIBUTE = 13;
/**
* The feature id for the '<em><b>Java Object</b></em>' attribute.
@@ -541,7 +587,7 @@ public interface Model3Package extends EPackage, org.eclipse.emf.cdo.tests.model
* @see org.eclipse.emf.cdo.tests.model3.legacy.impl.Model3PackageImpl#getPoint()
* @generated
*/
- int POINT = 13;
+ int POINT = 14;
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.Class1 <em>Class1</em>}'. <!--
@@ -854,6 +900,49 @@ public interface Model3Package extends EPackage, org.eclipse.emf.cdo.tests.model
EReference getNodeD_OppositeNode();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.NodeE <em>Node E</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Node E</em>'.
+ * @see org.eclipse.emf.cdo.tests.model3.NodeE
+ * @generated
+ */
+ EClass getNodeE();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model3.NodeE#getMainNode <em>Main Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Main Node</em>'.
+ * @see org.eclipse.emf.cdo.tests.model3.NodeE#getMainNode()
+ * @see #getNodeE()
+ * @generated
+ */
+ EReference getNodeE_MainNode();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model3.NodeE#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.NodeE#getName()
+ * @see #getNodeE()
+ * @generated
+ */
+ EAttribute getNodeE_Name();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeE#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.NodeE#getOtherNodes()
+ * @see #getNodeE()
+ * @generated
+ */
+ EReference getNodeE_OtherNodes();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model3.Image <em>Image</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3FactoryImpl.java
index 05085d353a..2c17918b36 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3FactoryImpl.java
@@ -22,6 +22,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Point;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
@@ -99,6 +100,8 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory
return createNodeC();
case Model3Package.NODE_D:
return createNodeD();
+ case Model3Package.NODE_E:
+ return createNodeE();
case Model3Package.IMAGE:
return createImage();
case Model3Package.FILE:
@@ -227,6 +230,17 @@ public class Model3FactoryImpl extends EFactoryImpl implements Model3Factory
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeE createNodeE()
+ {
+ NodeEImpl nodeE = new NodeEImpl();
+ return nodeE;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3PackageImpl.java
index 3ef8013785..2894749e30 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/Model3PackageImpl.java
@@ -22,6 +22,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Point;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
@@ -94,6 +95,13 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
private EClass nodeDEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass nodeEEClass = null;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -473,6 +481,46 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNodeE()
+ {
+ return nodeEEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNodeE_MainNode()
+ {
+ return (EReference)nodeEEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNodeE_Name()
+ {
+ return (EAttribute)nodeEEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNodeE_OtherNodes()
+ {
+ return (EReference)nodeEEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -668,6 +716,11 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
createEReference(nodeDEClass, NODE_D__OTHER_NODES);
createEReference(nodeDEClass, NODE_D__OPPOSITE_NODE);
+ nodeEEClass = createEClass(NODE_E);
+ createEReference(nodeEEClass, NODE_E__MAIN_NODE);
+ createEAttribute(nodeEEClass, NODE_E__NAME);
+ createEReference(nodeEEClass, NODE_E__OTHER_NODES);
+
imageEClass = createEClass(IMAGE);
createEAttribute(imageEClass, IMAGE__WIDTH);
createEAttribute(imageEClass, IMAGE__HEIGHT);
@@ -807,6 +860,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
NodeD.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(nodeEEClass, NodeE.class, "NodeE", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getNodeE_MainNode(), this.getNodeA(), null, "mainNode", null, 0, 1, NodeE.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+ initEAttribute(getNodeE_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeE.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNodeE_OtherNodes(), this.getNodeA(), null, "otherNodes", null, 0, -1, NodeE.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+
initEClass(imageEClass, Image.class, "Image", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getImage_Width(), theEcorePackage.getEInt(), "width", null, 0, 1, Image.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/NodeEImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/NodeEImpl.java
new file mode 100644
index 0000000000..98463881e7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/impl/NodeEImpl.java
@@ -0,0 +1,286 @@
+/**
+ */
+package org.eclipse.emf.cdo.tests.model3.legacy.impl;
+
+import org.eclipse.emf.cdo.tests.model3.NodeA;
+import org.eclipse.emf.cdo.tests.model3.NodeE;
+import org.eclipse.emf.cdo.tests.model3.legacy.Model3Package;
+
+import org.eclipse.emf.common.notify.Notification;
+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.EObjectResolvingEList;
+
+import java.util.Collection;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Node E</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.legacy.impl.NodeEImpl#getMainNode <em>Main Node</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.legacy.impl.NodeEImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.legacy.impl.NodeEImpl#getOtherNodes <em>Other Nodes</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class NodeEImpl extends EObjectImpl implements NodeE
+{
+ /**
+ * The cached value of the '{@link #getMainNode() <em>Main Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMainNode()
+ * @generated
+ * @ordered
+ */
+ protected NodeA mainNode;
+
+ /**
+ * 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<NodeA> otherNodes;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeEImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model3Package.eINSTANCE.getNodeE();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeA getMainNode()
+ {
+ if (mainNode != null && mainNode.eIsProxy())
+ {
+ InternalEObject oldMainNode = (InternalEObject)mainNode;
+ mainNode = (NodeA)eResolveProxy(oldMainNode);
+ if (mainNode != oldMainNode)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model3Package.NODE_E__MAIN_NODE, oldMainNode,
+ mainNode));
+ }
+ }
+ return mainNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NodeA basicGetMainNode()
+ {
+ return mainNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMainNode(NodeA newMainNode)
+ {
+ NodeA oldMainNode = mainNode;
+ mainNode = newMainNode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.NODE_E__MAIN_NODE, oldMainNode, mainNode));
+ }
+
+ /**
+ * <!-- 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_E__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<NodeA> getOtherNodes()
+ {
+ if (otherNodes == null)
+ {
+ otherNodes = new EObjectResolvingEList<NodeA>(NodeA.class, this, Model3Package.NODE_E__OTHER_NODES);
+ }
+ return otherNodes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case Model3Package.NODE_E__MAIN_NODE:
+ if (resolve)
+ return getMainNode();
+ return basicGetMainNode();
+ case Model3Package.NODE_E__NAME:
+ return getName();
+ case Model3Package.NODE_E__OTHER_NODES:
+ return getOtherNodes();
+ }
+ 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_E__MAIN_NODE:
+ setMainNode((NodeA)newValue);
+ return;
+ case Model3Package.NODE_E__NAME:
+ setName((String)newValue);
+ return;
+ case Model3Package.NODE_E__OTHER_NODES:
+ getOtherNodes().clear();
+ getOtherNodes().addAll((Collection<? extends NodeA>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model3Package.NODE_E__MAIN_NODE:
+ setMainNode((NodeA)null);
+ return;
+ case Model3Package.NODE_E__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case Model3Package.NODE_E__OTHER_NODES:
+ getOtherNodes().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model3Package.NODE_E__MAIN_NODE:
+ return mainNode != null;
+ case Model3Package.NODE_E__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case Model3Package.NODE_E__OTHER_NODES:
+ return otherNodes != null && !otherNodes.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();
+ }
+
+} // NodeEImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3AdapterFactory.java
index 1584b69b18..cf38105162 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3AdapterFactory.java
@@ -22,6 +22,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
import org.eclipse.emf.cdo.tests.model3.legacy.Model3Package;
@@ -142,6 +143,12 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseNodeE(NodeE object)
+ {
+ return createNodeEAdapter();
+ }
+
+ @Override
public Adapter caseImage(Image object)
{
return createImageAdapter();
@@ -313,6 +320,21 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.NodeE <em>Node E</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.NodeE
+ * @generated
+ */
+ public Adapter createNodeEAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.Image <em>Image</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3Switch.java
index 1578b2f473..30d36ad5e0 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/legacy/util/Model3Switch.java
@@ -21,6 +21,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
import org.eclipse.emf.cdo.tests.model3.legacy.Model3Package;
@@ -176,6 +177,14 @@ public class Model3Switch<T>
result = defaultCase(theEObject);
return result;
}
+ case Model3Package.NODE_E:
+ {
+ NodeE nodeE = (NodeE)theEObject;
+ T result = caseNodeE(nodeE);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
case Model3Package.IMAGE:
{
Image image = (Image)theEObject;
@@ -350,6 +359,22 @@ public class Model3Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Node E</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 E</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNodeE(NodeE object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Image</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
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 a957fb3ec4..b35059b577 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
@@ -23,6 +23,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
@@ -137,6 +138,12 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseNodeE(NodeE object)
+ {
+ return createNodeEAdapter();
+ }
+
+ @Override
public Adapter caseImage(Image object)
{
return createImageAdapter();
@@ -296,6 +303,21 @@ public class Model3AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.NodeE <em>Node E</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.NodeE
+ * @generated
+ */
+ public Adapter createNodeEAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model3.Image <em>Image</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 -->
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 f34ad81645..7ec74c352c 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
@@ -22,6 +22,7 @@ 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.NodeE;
import org.eclipse.emf.cdo.tests.model3.Polygon;
import org.eclipse.emf.cdo.tests.model3.PolygonWithDuplicates;
@@ -166,6 +167,14 @@ public class Model3Switch<T>
result = defaultCase(theEObject);
return result;
}
+ case Model3Package.NODE_E:
+ {
+ NodeE nodeE = (NodeE)theEObject;
+ T result = caseNodeE(nodeE);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
case Model3Package.IMAGE:
{
Image image = (Image)theEObject;
@@ -326,6 +335,22 @@ public class Model3Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Node E</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 E</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseNodeE(NodeE object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Image</em>'.
* <!-- begin-user-doc --> This
* implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_414949_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_414949_Test.java
new file mode 100644
index 0000000000..8d1b6f0e17
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_414949_Test.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2010-2012 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:
+ * Esteban Dugueperoux - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.bugzilla;
+
+import org.eclipse.emf.cdo.eresource.CDOResource;
+import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.AbstractCDOTest;
+import org.eclipse.emf.cdo.tests.config.IModelConfig;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.CleanRepositoriesBefore;
+import org.eclipse.emf.cdo.tests.config.impl.ConfigTest.Requires;
+import org.eclipse.emf.cdo.tests.model3.NodeA;
+import org.eclipse.emf.cdo.tests.model3.NodeE;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+import org.eclipse.emf.cdo.util.CDOUtil;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
+
+import java.io.File;
+import java.util.Collections;
+
+/**
+ * Bug 414949 - ArrayIndexOutOfBoundsException with CDOLegacyWrapper and CDOIDExternal
+ *
+ * @author Esteban Dugueperoux
+ */
+@CleanRepositoriesBefore
+@Requires(IModelConfig.CAPABILITY_LEGACY)
+public class Bugzilla_414949_Test extends AbstractCDOTest
+{
+
+ private static final String SHARED_RESOURCE_NAME = "sharedResource.aird";
+
+ private static final String LOCAL_RESOURCE_NAME = "localResource.xmi";
+
+ private Resource localResource;
+
+ private Object oldResourceFactory;
+
+ @Override
+ protected void doSetUp() throws Exception
+ {
+ super.doSetUp();
+ NodeE dDiagram = getModel3Factory().createNodeE();
+
+ NodeA diagramDescription = getModel3Factory().createNodeA();
+ NodeA concernSet = getModel3Factory().createNodeA();
+ NodeA concernDescription = getModel3Factory().createNodeA();
+ CDOUtil.getCDOObject(concernDescription);
+ NodeA filterDescription1 = getModel3Factory().createNodeA();
+ CDOUtil.getCDOObject(filterDescription1);
+ concernDescription.getOtherNodes().add(filterDescription1);
+ diagramDescription.getChildren().add(filterDescription1);
+ concernSet.getChildren().add(concernDescription);
+ diagramDescription.getChildren().add(concernSet);
+
+ dDiagram.setMainNode(concernDescription);
+ dDiagram.getOtherNodes().add(filterDescription1);
+
+ ResourceSet resourceSet = new ResourceSetImpl();
+ oldResourceFactory = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*",
+ new XMIResourceFactoryImpl());
+ String path = new File("./" + LOCAL_RESOURCE_NAME).getCanonicalPath();
+ URI localResourceURI = URI.createFileURI(path);
+ localResource = resourceSet.createResource(localResourceURI);
+ localResource.getContents().add(diagramDescription);
+ localResource.save(Collections.emptyMap());
+
+ CDOSession session = openSession();
+ CDOTransaction cdoTransaction = session.openTransaction(resourceSet);
+ Resource sharedResource = cdoTransaction.createResource(getResourcePath(SHARED_RESOURCE_NAME));
+ sharedResource.getContents().add(dDiagram);
+ sharedResource.save(Collections.emptyMap());
+ }
+
+ public void testEcoreUtilGetURIWithCDOLegacyWrapperBug() throws Exception
+ {
+
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+ CDOResource resource = transaction.getResource(getResourcePath(SHARED_RESOURCE_NAME));
+ EList<EObject> contents = resource.getContents();
+ contents.get(0);
+ }
+
+ @Override
+ protected void doTearDown() throws Exception
+ {
+ localResource.delete(Collections.emptyMap());
+ localResource = null;
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", oldResourceFactory);
+ oldResourceFactory = null;
+ super.doTearDown();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
index 9ea71ea385..d313484ff2 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
@@ -1207,14 +1207,11 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
InternalCDOObject object = (InternalCDOObject)idOrObject;
if (object.cdoView() != null && FSMUtil.isNew(object))
{
- String uri = EcoreUtil.getURI(eObject).toString();
+ String uri = EcoreUtil.getURI(object.cdoInternalInstance()).toString();
if (object.cdoID().isTemporary())
{
return CDOIDUtil.createTempObjectExternal(uri);
}
-
- // New objects with non-temporary IDs are possible. Likely UUIDs
- return CDOIDUtil.createExternal(uri);
}
}
@@ -1224,7 +1221,7 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
// Check if eObject is contained by a deleted resource
if (!(eResource instanceof CDOResource) || ((CDOResource)eResource).cdoState() != CDOState.TRANSIENT)
{
- String uri = EcoreUtil.getURI(eObject).toString();
+ String uri = EcoreUtil.getURI(CDOUtil.getEObject(eObject)).toString();
return CDOIDUtil.createExternal(uri);
}
}

Back to the top