summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2012-10-31 01:43:21 (EDT)
committer Eike Stepper2012-10-31 01:59:28 (EDT)
commitecf34dbf6e73114f17704797fa9bc80c39188152 (patch)
treefd36c8fd928ac7067ca63af3ac5e9233fc788c04
parent10a7b6b99cf6eaa8f35000320ccb8b0544d2bca8 (diff)
downloadcdo-ecf34dbf6e73114f17704797fa9bc80c39188152.zip
cdo-ecf34dbf6e73114f17704797fa9bc80c39188152.tar.gz
cdo-ecf34dbf6e73114f17704797fa9bc80c39188152.tar.bz2
[393164] [Legacy] Models that depend on Resource.Internal.isLoading()
don't work in CDOResource https://bugs.eclipse.org/bugs/show_bug.cgi?id=393164
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5-legacy.genmodel3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java170
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ChildImpl.java83
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java64
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ParentImpl.java83
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Child.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java168
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Parent.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ChildImpl.java28
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java64
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ParentImpl.java27
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/IsLoadingTestFixture.java103
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java28
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java60
22 files changed, 806 insertions, 227 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF
index db74c87..9099ffa 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
+ org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport,
+ org.junit;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Export-Package: org.eclipse.emf.cdo.tests.legacy.model5;version="3.0.200",
org.eclipse.emf.cdo.tests.legacy.model5.impl;version="3.0.200",
org.eclipse.emf.cdo.tests.model5;version="3.0.300",
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5-legacy.genmodel b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5-legacy.genmodel
index 5aab504..87db3c2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5-legacy.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5-legacy.genmodel
@@ -7,6 +7,7 @@
complianceLevel="5.0" providerRootExtendsClass="" runtimeVersion="2.6">
<foreignModel>model5.ecore</foreignModel>
<modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
+ <modelPluginVariables>JUNIT=org.junit</modelPluginVariables>
<genPackages prefix="Model5" basePackage="org.eclipse.emf.cdo.tests.legacy" disposableProviderFactory="true"
literalsInterface="false" extensibleProviderFactory="true" childCreationExtenders="true"
ecorePackage="model5.ecore#/">
@@ -54,10 +55,12 @@
<genClasses ecoreClass="model5.ecore#//Parent">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model5.ecore#//Parent/children"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//Parent/favourite"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//Parent/name"/>
</genClasses>
<genClasses ecoreClass="model5.ecore#//Child">
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference model5.ecore#//Child/parent"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//Child/preferredBy"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//Child/name"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
index 7761e1a..2759ffe 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
@@ -74,11 +74,13 @@
eType="#//Child" containment="true" eOpposite="#//Child/parent"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="favourite" eType="#//Child"
eOpposite="#//Child/preferredBy"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Child">
<eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//Parent"
eOpposite="#//Parent/children"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="preferredBy" eType="#//Parent"
eOpposite="#//Parent/favourite"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
index f310b91..a5bd8af 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
@@ -8,6 +8,7 @@
runtimeVersion="2.6">
<foreignModel>model5.ecore</foreignModel>
<modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
+ <modelPluginVariables>JUNIT=org.junit</modelPluginVariables>
<genPackages prefix="Model5" basePackage="org.eclipse.emf.cdo.tests" disposableProviderFactory="true"
literalsInterface="false" extensibleProviderFactory="true" childCreationExtenders="true"
ecorePackage="model5.ecore#/">
@@ -55,10 +56,12 @@
<genClasses ecoreClass="model5.ecore#//Parent">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference model5.ecore#//Parent/children"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//Parent/favourite"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//Parent/name"/>
</genClasses>
<genClasses ecoreClass="model5.ecore#//Child">
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference model5.ecore#//Child/parent"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//Child/preferredBy"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//Child/name"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java
index d78e6ac..2a47bc2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Factory.java
@@ -31,7 +31,7 @@ import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
* <!-- begin-user-doc --> The <b>Factory</b> for the model. It provides a create method for each non-abstract class of
* the model. <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.legacy.model5.Model5Package
- * @generated
+ * @generated NOT
*/
public interface Model5Factory extends org.eclipse.emf.cdo.tests.model5.Model5Factory
{
@@ -170,20 +170,20 @@ public interface Model5Factory extends org.eclipse.emf.cdo.tests.model5.Model5Fa
Parent createParent();
/**
- * Returns a new object of class '<em>Child</em>'.
- * <!-- begin-user-doc -->
+ * Returns a new object of class '<em>Child</em>'.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return a new object of class '<em>Child</em>'.
- * @generated
- */
+ * @return a new object of class '<em>Child</em>'.
+ * @generated
+ */
Child createChild();
/**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
Model5Package getModel5Package();
} // Model5Factory
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java
index 0e56d47..f4afddf 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/Model5Package.java
@@ -26,7 +26,7 @@ import org.eclipse.emf.ecore.EReference;
* <!-- end-user-doc -->
* @see org.eclipse.emf.cdo.tests.legacy.model5.Model5Factory
* @model kind="package"
- * @generated
+ * @generated NOT
*/
public interface Model5Package extends org.eclipse.emf.cdo.tests.model5.Model5Package
{
@@ -437,75 +437,93 @@ public interface Model5Package extends org.eclipse.emf.cdo.tests.model5.Model5Pa
int PARENT = 14;
/**
- * The feature id for the '<em><b>Children</b></em>' containment reference list.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int PARENT__CHILDREN = 0;
/**
- * The feature id for the '<em><b>Favourite</b></em>' reference.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Favourite</b></em>' reference.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int PARENT__FAVOURITE = 1;
/**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT__NAME = 2;
+
+ /**
* The number of structural features of the '<em>Parent</em>' class.
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @generated
* @ordered
*/
- int PARENT_FEATURE_COUNT = 2;
+ int PARENT_FEATURE_COUNT = 3;
/**
- * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ChildImpl <em>Child</em>}' class.
- * <!-- begin-user-doc -->
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ChildImpl <em>Child</em>}' class.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.ChildImpl
- * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getChild()
- * @generated
- */
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.ChildImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getChild()
+ * @generated
+ */
int CHILD = 15;
/**
- * The feature id for the '<em><b>Parent</b></em>' container reference.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int CHILD__PARENT = 0;
/**
- * The feature id for the '<em><b>Preferred By</b></em>' reference.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Preferred By</b></em>' reference.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int CHILD__PREFERRED_BY = 1;
/**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD__NAME = 2;
+
+ /**
* The number of structural features of the '<em>Child</em>' class.
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @generated
* @ordered
*/
- int CHILD_FEATURE_COUNT = 2;
+ int CHILD_FEATURE_COUNT = 3;
/**
- * The meta object id for the '<em>Int Array</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getIntArray()
- * @generated
- */
+ * The meta object id for the '<em>Int Array</em>' data type.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
int INT_ARRAY = 16;
/**
@@ -804,31 +822,42 @@ public interface Model5Package extends org.eclipse.emf.cdo.tests.model5.Model5Pa
EClass getParent();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model5.Parent#getChildren <em>Children</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.legacy.model5.Parent#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.model5.Parent#getChildren()
- * @see #getParent()
- * @generated
- */
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.Parent#getChildren()
+ * @see #getParent()
+ * @generated
+ */
EReference getParent_Children();
/**
- * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model5.Parent#getFavourite <em>Favourite</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model5.Parent#getFavourite <em>Favourite</em>}'.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Favourite</em>'.
- * @see org.eclipse.emf.cdo.tests.legacy.model5.Parent#getFavourite()
- * @see #getParent()
- * @generated
- */
+ * @return the meta object for the reference '<em>Favourite</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.Parent#getFavourite()
+ * @see #getParent()
+ * @generated
+ */
EReference getParent_Favourite();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model5.Parent#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.model5.Parent#getName()
+ * @see #getParent()
+ * @generated
+ */
+ EAttribute getParent_Name();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model5.Child <em>Child</em>}'.
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @return the meta object for class '<em>Child</em>'.
* @see org.eclipse.emf.cdo.tests.legacy.model5.Child
* @generated
@@ -836,28 +865,39 @@ public interface Model5Package extends org.eclipse.emf.cdo.tests.model5.Model5Pa
EClass getChild();
/**
- * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.legacy.model5.Child#getParent <em>Parent</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.legacy.model5.Child#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.model5.Child#getParent()
- * @see #getChild()
- * @generated
- */
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.Child#getParent()
+ * @see #getChild()
+ * @generated
+ */
EReference getChild_Parent();
/**
- * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model5.Child#getPreferredBy <em>Preferred By</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.legacy.model5.Child#getPreferredBy <em>Preferred By</em>}'.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Preferred By</em>'.
- * @see org.eclipse.emf.cdo.tests.legacy.model5.Child#getPreferredBy()
- * @see #getChild()
- * @generated
- */
+ * @return the meta object for the reference '<em>Preferred By</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model5.Child#getPreferredBy()
+ * @see #getChild()
+ * @generated
+ */
EReference getChild_PreferredBy();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.legacy.model5.Child#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.model5.Child#getName()
+ * @see #getChild()
+ * @generated
+ */
+ EAttribute getChild_Name();
+
+ /**
* Returns the meta object for data type '<em>Int Array</em>'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for data type '<em>Int Array</em>'.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ChildImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ChildImpl.java
index 2637b50..9f4364a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ChildImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ChildImpl.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.legacy.model5.impl;
import org.eclipse.emf.cdo.tests.legacy.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Child;
import org.eclipse.emf.cdo.tests.model5.Parent;
+import org.eclipse.emf.cdo.tests.model5.util.IsLoadingTestFixture;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
@@ -31,6 +32,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ChildImpl#getParent <em>Parent</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ChildImpl#getPreferredBy <em>Preferred By</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ChildImpl#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -56,10 +58,30 @@ public class ChildImpl extends EObjectImpl implements Child
protected Parent preferredBy;
/**
+ * 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;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
protected ChildImpl()
{
super();
@@ -229,6 +251,37 @@ public class ChildImpl extends EObjectImpl implements Child
* <!-- end-user-doc -->
* @generated
*/
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNameGen(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, Model5Package.CHILD__NAME, oldName, name));
+ }
+ }
+
+ public void setName(String newName)
+ {
+ IsLoadingTestFixture.reportLoading(eResource(), this);
+ setNameGen(newName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
@@ -302,6 +355,8 @@ public class ChildImpl extends EObjectImpl implements Child
return getPreferredBy();
}
return basicGetPreferredBy();
+ case Model5Package.CHILD__NAME:
+ return getName();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -322,6 +377,9 @@ public class ChildImpl extends EObjectImpl implements Child
case Model5Package.CHILD__PREFERRED_BY:
setPreferredBy((Parent)newValue);
return;
+ case Model5Package.CHILD__NAME:
+ setName((String)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -342,6 +400,9 @@ public class ChildImpl extends EObjectImpl implements Child
case Model5Package.CHILD__PREFERRED_BY:
setPreferredBy((Parent)null);
return;
+ case Model5Package.CHILD__NAME:
+ setName(NAME_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -360,8 +421,30 @@ public class ChildImpl extends EObjectImpl implements Child
return getParent() != null;
case Model5Package.CHILD__PREFERRED_BY:
return preferredBy != null;
+ case Model5Package.CHILD__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
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();
+ }
+
} // ChildImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java
index be030fd..3beaf21 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5FactoryImpl.java
@@ -311,10 +311,10 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public Child createChild()
{
ChildImpl child = new ChildImpl();
@@ -322,9 +322,9 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public int[] createIntArrayFromString(EDataType eDataType, String initialValue)
{
return (int[])super.createFromString(initialValue);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java
index b1b9408..2d6e2ce 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/Model5PackageImpl.java
@@ -140,16 +140,16 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
private EClass parentEClass = null;
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
private EClass childEClass = null;
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
private EDataType intArrayEDataType = null;
/**
@@ -476,28 +476,38 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getParent_Children()
{
return (EReference)parentEClass.getEStructuralFeatures().get(0);
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getParent_Favourite()
{
return (EReference)parentEClass.getEStructuralFeatures().get(1);
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParent_Name()
+ {
+ return (EAttribute)parentEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public EClass getChild()
@@ -506,26 +516,36 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getChild_Parent()
{
return (EReference)childEClass.getEStructuralFeatures().get(0);
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getChild_PreferredBy()
{
return (EReference)childEClass.getEStructuralFeatures().get(1);
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getChild_Name()
+ {
+ return (EAttribute)childEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -607,10 +627,12 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
parentEClass = createEClass(PARENT);
createEReference(parentEClass, PARENT__CHILDREN);
createEReference(parentEClass, PARENT__FAVOURITE);
+ createEAttribute(parentEClass, PARENT__NAME);
childEClass = createEClass(CHILD);
createEReference(childEClass, CHILD__PARENT);
createEReference(childEClass, CHILD__PREFERRED_BY);
+ createEAttribute(childEClass, CHILD__NAME);
// Create data types
intArrayEDataType = createEDataType(INT_ARRAY);
@@ -731,6 +753,8 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEReference(getParent_Favourite(), this.getChild(), this.getChild_PreferredBy(), "favourite", null, 0, 1,
Parent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getParent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Parent.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(childEClass, Child.class, "Child", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getChild_Parent(), this.getParent(), this.getParent_Children(), "parent", null, 0, 1, Child.class,
@@ -739,6 +763,8 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEReference(getChild_PreferredBy(), this.getParent(), this.getParent_Favourite(), "preferredBy", null, 0, 1,
Child.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getChild_Name(), ecorePackage.getEString(), "name", null, 0, 1, Child.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize data types
initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ParentImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ParentImpl.java
index 1c356e0..2c06232 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ParentImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/legacy/model5/impl/ParentImpl.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.legacy.model5.impl;
import org.eclipse.emf.cdo.tests.legacy.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Child;
import org.eclipse.emf.cdo.tests.model5.Parent;
+import org.eclipse.emf.cdo.tests.model5.util.IsLoadingTestFixture;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
@@ -35,6 +36,7 @@ import java.util.Collection;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ParentImpl#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ParentImpl#getFavourite <em>Favourite</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model5.impl.ParentImpl#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -70,10 +72,30 @@ public class ParentImpl extends EObjectImpl implements Parent
protected Child favourite;
/**
+ * 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;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
protected ParentImpl()
{
super();
@@ -198,6 +220,37 @@ public class ParentImpl extends EObjectImpl implements Parent
* <!-- end-user-doc -->
* @generated
*/
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNameGen(String newName)
+ {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, Model5Package.PARENT__NAME, oldName, name));
+ }
+ }
+
+ public void setName(String newName)
+ {
+ IsLoadingTestFixture.reportLoading(eResource(), this);
+ setNameGen(newName);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)
@@ -252,6 +305,8 @@ public class ParentImpl extends EObjectImpl implements Parent
return getFavourite();
}
return basicGetFavourite();
+ case Model5Package.PARENT__NAME:
+ return getName();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -274,6 +329,9 @@ public class ParentImpl extends EObjectImpl implements Parent
case Model5Package.PARENT__FAVOURITE:
setFavourite((Child)newValue);
return;
+ case Model5Package.PARENT__NAME:
+ setName((String)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -294,6 +352,9 @@ public class ParentImpl extends EObjectImpl implements Parent
case Model5Package.PARENT__FAVOURITE:
setFavourite((Child)null);
return;
+ case Model5Package.PARENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -312,8 +373,30 @@ public class ParentImpl extends EObjectImpl implements Parent
return children != null && !children.isEmpty();
case Model5Package.PARENT__FAVOURITE:
return favourite != null;
+ case Model5Package.PARENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
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();
+ }
+
} // ParentImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Child.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Child.java
index 7f594ff..c294f3b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Child.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Child.java
@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model5.Child#getParent <em>Parent</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model5.Child#getPreferredBy <em>Preferred By</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.Child#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -87,4 +88,30 @@ public interface Child extends EObject
*/
void setPreferredBy(Parent 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.model5.Model5Package#getChild_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model5.Child#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);
+
} // Child
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
index 26ff41f..93921d4 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
@@ -141,20 +141,20 @@ public interface Model5Factory extends EFactory
Parent createParent();
/**
- * Returns a new object of class '<em>Child</em>'.
- * <!-- begin-user-doc -->
+ * Returns a new object of class '<em>Child</em>'.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return a new object of class '<em>Child</em>'.
- * @generated
- */
+ * @return a new object of class '<em>Child</em>'.
+ * @generated
+ */
Child createChild();
/**
- * Returns a new object of class '<em>Gen List Of String</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return a new object of class '<em>Gen List Of String</em>'.
- * @generated
- */
+ * Returns a new object of class '<em>Gen List Of String</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen List Of String</em>'.
+ * @generated
+ */
GenListOfString createGenListOfString();
/**
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
index 2be4d1a..798abc6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
@@ -434,75 +434,93 @@ public interface Model5Package extends EPackage
int PARENT = 14;
/**
- * The feature id for the '<em><b>Children</b></em>' containment reference list.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Children</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int PARENT__CHILDREN = 0;
/**
- * The feature id for the '<em><b>Favourite</b></em>' reference.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Favourite</b></em>' reference.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int PARENT__FAVOURITE = 1;
/**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARENT__NAME = 2;
+
+ /**
* The number of structural features of the '<em>Parent</em>' class.
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @generated
* @ordered
*/
- int PARENT_FEATURE_COUNT = 2;
+ int PARENT_FEATURE_COUNT = 3;
/**
- * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model5.impl.ChildImpl <em>Child</em>}' class.
- * <!-- begin-user-doc -->
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model5.impl.ChildImpl <em>Child</em>}' class.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.tests.model5.impl.ChildImpl
- * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getChild()
- * @generated
- */
+ * @see org.eclipse.emf.cdo.tests.model5.impl.ChildImpl
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getChild()
+ * @generated
+ */
int CHILD = 15;
/**
- * The feature id for the '<em><b>Parent</b></em>' container reference.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Parent</b></em>' container reference.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int CHILD__PARENT = 0;
/**
- * The feature id for the '<em><b>Preferred By</b></em>' reference.
- * <!-- begin-user-doc -->
+ * The feature id for the '<em><b>Preferred By</b></em>' reference.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- * @ordered
- */
+ * @generated
+ * @ordered
+ */
int CHILD__PREFERRED_BY = 1;
/**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CHILD__NAME = 2;
+
+ /**
* The number of structural features of the '<em>Child</em>' class.
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @generated
* @ordered
*/
- int CHILD_FEATURE_COUNT = 2;
+ int CHILD_FEATURE_COUNT = 3;
/**
- * The meta object id for the '<em>Int Array</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getIntArray()
- * @generated
- */
+ * The meta object id for the '<em>Int Array</em>' data type.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
int INT_ARRAY = 16;
/**
@@ -769,31 +787,42 @@ public interface Model5Package extends EPackage
EClass getParent();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model5.Parent#getChildren <em>Children</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.tests.model5.Parent#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.model5.Parent#getChildren()
- * @see #getParent()
- * @generated
- */
+ * @return the meta object for the containment reference list '<em>Children</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.Parent#getChildren()
+ * @see #getParent()
+ * @generated
+ */
EReference getParent_Children();
/**
- * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model5.Parent#getFavourite <em>Favourite</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model5.Parent#getFavourite <em>Favourite</em>}'.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Favourite</em>'.
- * @see org.eclipse.emf.cdo.tests.model5.Parent#getFavourite()
- * @see #getParent()
- * @generated
- */
+ * @return the meta object for the reference '<em>Favourite</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.Parent#getFavourite()
+ * @see #getParent()
+ * @generated
+ */
EReference getParent_Favourite();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model5.Parent#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.model5.Parent#getName()
+ * @see #getParent()
+ * @generated
+ */
+ EAttribute getParent_Name();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.Child <em>Child</em>}'.
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @return the meta object for class '<em>Child</em>'.
* @see org.eclipse.emf.cdo.tests.model5.Child
* @generated
@@ -801,28 +830,39 @@ public interface Model5Package extends EPackage
EClass getChild();
/**
- * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model5.Child#getParent <em>Parent</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.tests.model5.Child#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.model5.Child#getParent()
- * @see #getChild()
- * @generated
- */
+ * @return the meta object for the container reference '<em>Parent</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.Child#getParent()
+ * @see #getChild()
+ * @generated
+ */
EReference getChild_Parent();
/**
- * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model5.Child#getPreferredBy <em>Preferred By</em>}'.
- * <!-- begin-user-doc -->
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.tests.model5.Child#getPreferredBy <em>Preferred By</em>}'.
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Preferred By</em>'.
- * @see org.eclipse.emf.cdo.tests.model5.Child#getPreferredBy()
- * @see #getChild()
- * @generated
- */
+ * @return the meta object for the reference '<em>Preferred By</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.Child#getPreferredBy()
+ * @see #getChild()
+ * @generated
+ */
EReference getChild_PreferredBy();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model5.Child#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.model5.Child#getName()
+ * @see #getChild()
+ * @generated
+ */
+ EAttribute getChild_Name();
+
+ /**
* Returns the meta object for data type '<em>Int Array</em>'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for data type '<em>Int Array</em>'.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Parent.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Parent.java
index f46d8ab..b799c56 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Parent.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Parent.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model5.Parent#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model5.Parent#getFavourite <em>Favourite</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.Parent#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -78,4 +79,30 @@ public interface Parent extends EObject
*/
void setFavourite(Child 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.model5.Model5Package#getParent_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model5.Parent#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);
+
} // Parent
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ChildImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ChildImpl.java
index cc3bcb7..aaa6be3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ChildImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ChildImpl.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.model5.impl;
import org.eclipse.emf.cdo.tests.model5.Child;
import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Parent;
+import org.eclipse.emf.cdo.tests.model5.util.IsLoadingTestFixture;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;
@@ -27,6 +28,7 @@ import org.eclipse.emf.ecore.EClass;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model5.impl.ChildImpl#getParent <em>Parent</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model5.impl.ChildImpl#getPreferredBy <em>Preferred By</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.impl.ChildImpl#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -106,4 +108,30 @@ public class ChildImpl extends CDOObjectImpl implements Child
eSet(Model5Package.eINSTANCE.getChild_PreferredBy(), newPreferredBy);
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(Model5Package.eINSTANCE.getChild_Name(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNameGen(String newName)
+ {
+ eSet(Model5Package.eINSTANCE.getChild_Name(), newName);
+ }
+
+ public void setName(String newName)
+ {
+ IsLoadingTestFixture.reportLoading(eResource(), this);
+ setNameGen(newName);
+ }
+
} // ChildImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
index 75407ff..3c17843 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
@@ -295,10 +295,10 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public Child createChild()
{
ChildImpl child = new ChildImpl();
@@ -306,9 +306,9 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public int[] createIntArrayFromString(EDataType eDataType, String initialValue)
{
return (int[])super.createFromString(initialValue);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
index fcc1553..ff855c6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
@@ -128,16 +128,16 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
private EClass parentEClass = null;
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
private EClass childEClass = null;
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @generated
- */
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
private EDataType intArrayEDataType = null;
/**
@@ -452,28 +452,38 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getParent_Children()
{
return (EReference)parentEClass.getEStructuralFeatures().get(0);
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getParent_Favourite()
{
return (EReference)parentEClass.getEStructuralFeatures().get(1);
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParent_Name()
+ {
+ return (EAttribute)parentEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
public EClass getChild()
@@ -482,26 +492,36 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getChild_Parent()
{
return (EReference)childEClass.getEStructuralFeatures().get(0);
}
/**
- * <!-- begin-user-doc -->
+ * <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
- */
+ * @generated
+ */
public EReference getChild_PreferredBy()
{
return (EReference)childEClass.getEStructuralFeatures().get(1);
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getChild_Name()
+ {
+ return (EAttribute)childEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -601,10 +621,12 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
parentEClass = createEClass(PARENT);
createEReference(parentEClass, PARENT__CHILDREN);
createEReference(parentEClass, PARENT__FAVOURITE);
+ createEAttribute(parentEClass, PARENT__NAME);
childEClass = createEClass(CHILD);
createEReference(childEClass, CHILD__PARENT);
createEReference(childEClass, CHILD__PREFERRED_BY);
+ createEAttribute(childEClass, CHILD__NAME);
// Create data types
intArrayEDataType = createEDataType(INT_ARRAY);
@@ -725,6 +747,8 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEReference(getParent_Favourite(), this.getChild(), this.getChild_PreferredBy(), "favourite", null, 0, 1,
Parent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getParent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Parent.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(childEClass, Child.class, "Child", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getChild_Parent(), this.getParent(), this.getParent_Children(), "parent", null, 0, 1, Child.class,
@@ -733,6 +757,8 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEReference(getChild_PreferredBy(), this.getParent(), this.getParent_Favourite(), "preferredBy", null, 0, 1,
Child.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getChild_Name(), ecorePackage.getEString(), "name", null, 0, 1, Child.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize data types
initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ParentImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ParentImpl.java
index c825d8f..c02be9e 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ParentImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/ParentImpl.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.model5.impl;
import org.eclipse.emf.cdo.tests.model5.Child;
import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Parent;
+import org.eclipse.emf.cdo.tests.model5.util.IsLoadingTestFixture;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;
@@ -28,6 +29,7 @@ import org.eclipse.emf.ecore.EClass;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model5.impl.ParentImpl#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model5.impl.ParentImpl#getFavourite <em>Favourite</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.impl.ParentImpl#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -98,4 +100,29 @@ public class ParentImpl extends CDOObjectImpl implements Parent
eSet(Model5Package.eINSTANCE.getParent_Favourite(), newFavourite);
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(Model5Package.eINSTANCE.getParent_Name(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNameGen(String newName)
+ {
+ eSet(Model5Package.eINSTANCE.getParent_Name(), newName);
+ }
+
+ public void setName(String newName)
+ {
+ IsLoadingTestFixture.reportLoading(eResource(), this);
+ setNameGen(newName);
+ }
} // ParentImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/IsLoadingTestFixture.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/IsLoadingTestFixture.java
new file mode 100644
index 0000000..ad40e41
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/IsLoadingTestFixture.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2004 - 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:
+ * Christian W. Damus (CEA) - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model5.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+/**
+ * Test fixture for the CDO resource "is loading" tests. Bug 393164.
+ */
+public class IsLoadingTestFixture
+{
+ private static IsLoadingTestFixture instance;
+
+ private Map<Resource, Set<EObject>> objectsReportedLoading = new HashMap<Resource, Set<EObject>>();
+
+ private IsLoadingTestFixture()
+ {
+ }
+
+ public static IsLoadingTestFixture newInstance()
+ {
+ IsLoadingTestFixture result = new IsLoadingTestFixture();
+ instance = result;
+ return result;
+ }
+
+ public void dispose()
+ {
+ if (instance == this)
+ {
+ instance = null;
+ }
+
+ objectsReportedLoading.clear();
+ }
+
+ public static void reportLoading(Resource resource, EObject object)
+ {
+ if (instance != null)
+ {
+ instance.doReportLoading(resource, object);
+ }
+ }
+
+ private Set<EObject> demandObjectsReportedLoading(Resource resource)
+ {
+ Set<EObject> result = objectsReportedLoading.get(resource);
+ if (result == null)
+ {
+ result = new java.util.HashSet<EObject>();
+ objectsReportedLoading.put(resource, result);
+ }
+
+ return result;
+ }
+
+ private Set<EObject> getObjectsReportedLoading(Resource resource)
+ {
+ Set<EObject> result = objectsReportedLoading.get(resource);
+ if (result == null)
+ {
+ result = Collections.emptySet();
+ }
+
+ return result;
+ }
+
+ private void doReportLoading(Resource resource, EObject object)
+ {
+ if (resource instanceof Resource.Internal && ((Resource.Internal)resource).isLoading())
+ {
+ demandObjectsReportedLoading(resource).add(object);
+ }
+ }
+
+ public void assertReportedLoading(Resource resource, EObject object)
+ {
+ Assert.assertEquals("Object did not report loading: " + object, true,
+ getObjectsReportedLoading(resource).contains(object));
+ }
+
+ public void assertNotReportedLoading(Resource resource, EObject object)
+ {
+ Assert.assertEquals("Object reported loading: " + object, false,
+ getObjectsReportedLoading(resource).contains(object));
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
index 6c8e14f..f76ddb0 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
@@ -397,29 +397,29 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.Child <em>Child</em>}'.
- * <!-- begin-user-doc -->
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.Child <em>Child</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.model5.Child
- * @generated
- */
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.tests.model5.Child
+ * @generated
+ */
public Adapter createChildAdapter()
{
return null;
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfString <em>Gen List Of String</em>}'.
- * <!-- begin-user-doc --> This default implementation returns null so that we can
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfString <em>Gen List Of String</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.model5.GenListOfString
- * @generated
- */
+ * @return the new adapter.
+ * @see org.eclipse.emf.cdo.tests.model5.GenListOfString
+ * @generated
+ */
public Adapter createGenListOfStringAdapter()
{
return null;
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
index cf592de..8cbd014 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
@@ -437,30 +437,30 @@ public class Model5Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Child</em>'.
- * <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>Child</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>Child</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Child</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
public T caseChild(Child object)
{
return null;
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of String</em>'.
- * <!-- begin-user-doc
+ * Returns the result of interpreting the object as an instance of '<em>Gen List Of String</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>Gen List Of String</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Gen List Of String</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
public T caseGenListOfString(GenListOfString object)
{
return null;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
index d85b005..0827cc5 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ResourceTest.java
@@ -8,6 +8,7 @@
* Contributors:
* Simon McDuff - initial API and implementation
* Eike Stepper - maintenance
+ * Christian W. Damus (CEA) - CDOResource isLoading() support
*/
package org.eclipse.emf.cdo.tests;
@@ -23,12 +24,16 @@ import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
import org.eclipse.emf.cdo.eresource.CDOResourceNode;
import org.eclipse.emf.cdo.eresource.CDOTextResource;
import org.eclipse.emf.cdo.session.CDOSession;
+import org.eclipse.emf.cdo.tests.config.impl.ModelConfig;
import org.eclipse.emf.cdo.tests.model1.Category;
import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.OrderDetail;
import org.eclipse.emf.cdo.tests.model1.Product1;
import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model5.Child;
+import org.eclipse.emf.cdo.tests.model5.Parent;
+import org.eclipse.emf.cdo.tests.model5.util.IsLoadingTestFixture;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOURIUtil;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -62,6 +67,7 @@ import java.io.InputStream;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Iterator;
import java.util.List;
/**
@@ -1793,6 +1799,60 @@ public class ResourceTest extends AbstractCDOTest
}
/**
+ * Bug 393164: Test the support for {@code XMLResource}-like
+ * {@link org.eclipse.emf.ecore.resource.Resource.Internal#isLoading()}
+ * behaviour in {@link CDOResource}s for legacy models.
+ */
+ @Requires(ModelConfig.CAPABILITY_LEGACY)
+ public void testResourceIsLoading_legacy() throws Exception
+ {
+ final IsLoadingTestFixture fixture = IsLoadingTestFixture.newInstance();
+
+ try
+ {
+ CDOSession session = openSession();
+ CDOTransaction transaction = session.openTransaction();
+
+ CDOResource resource = transaction.createResource(getResourcePath("/my/resource1"));
+
+ Parent parent = getModel5Factory().createParent();
+ resource.getContents().add(parent);
+
+ parent.setName("parent");
+ fixture.assertNotReportedLoading(resource, parent);
+
+ Child child1 = getModel5Factory().createChild();
+ parent.getChildren().add(child1);
+ child1.setName("child1");
+ fixture.assertNotReportedLoading(resource, child1);
+
+ Child child2 = getModel5Factory().createChild();
+ parent.getChildren().add(child2);
+ child2.setName("child2");
+ fixture.assertNotReportedLoading(resource, child2);
+
+ transaction.commit();
+ session.close();
+
+ session = openSession();
+ transaction = session.openTransaction();
+ resource = transaction.getResource(getResourcePath("/my/resource1"));
+
+ for (Iterator<EObject> iter = resource.getAllContents(); iter.hasNext();)
+ {
+ // every object in the resource detected that it was being loaded
+ fixture.assertReportedLoading(resource, iter.next());
+ }
+
+ session.close();
+ }
+ finally
+ {
+ fixture.dispose();
+ }
+ }
+
+ /**
* @author Eike Stepper
*/
private static class TestAdapter extends AdapterImpl