summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaspar De Groot2009-12-28 05:40:56 (EST)
committerCaspar De Groot2009-12-28 05:40:56 (EST)
commita3fe0b6884bad3d5de5f74e1d537f49ae5c24eb0 (patch)
tree58f4e785ce3e867ee9a97f1ff1c50f2a3aba2518
parent1a7bdbdf3ec082134f8be489bca272a5928c6585 (diff)
downloadcdo-a3fe0b6884bad3d5de5f74e1d537f49ae5c24eb0.zip
cdo-a3fe0b6884bad3d5de5f74e1d537f49ae5c24eb0.tar.gz
cdo-a3fe0b6884bad3d5de5f74e1d537f49ae5c24eb0.tar.bz2
[285008] isSet method returns incorrect value after load
https://bugs.eclipse.org/bugs/show_bug.cgi?id=285008
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/model/model4.ecore9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/MultiNonContainedUnsettableElement.java115
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/RefMultiNonContainedUnsettable.java75
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/MultiNonContainedUnsettableElementImpl.java129
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/RefMultiNonContainedUnsettableImpl.java100
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4FactoryImpl.java28
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4PackageImpl.java106
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Factory.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Package.java214
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4AdapterFactory.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4Switch.java50
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_285008_Test.java148
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java42
14 files changed, 1045 insertions, 36 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/model/model4.ecore b/plugins/org.eclipse.emf.cdo.tests.model4/model/model4.ecore
index 4f9aad2..1a622ff 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model4/model/model4.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/model/model4.ecore
@@ -39,6 +39,15 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//RefMultiNonContained"
eOpposite="#//RefMultiNonContained/elements"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="RefMultiNonContainedUnsettable">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1"
+ eType="#//MultiNonContainedUnsettableElement" unsettable="true" eOpposite="#//MultiNonContainedUnsettableElement/parent"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="MultiNonContainedUnsettableElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//RefMultiNonContainedUnsettable"
+ unsettable="true" eOpposite="#//RefMultiNonContainedUnsettable/elements"/>
+ </eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RefSingleContainedNPL">
<eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="#//ContainedElementNoOpposite"
containment="true"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/MultiNonContainedUnsettableElement.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/MultiNonContainedUnsettableElement.java
new file mode 100644
index 0000000..d31c670
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/MultiNonContainedUnsettableElement.java
@@ -0,0 +1,115 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model4;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Multi Non Contained Unsettable Element</b></em>
+ * '. <!-- end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model4.model4Package#getMultiNonContainedUnsettableElement()
+ * @model
+ * @generated
+ */
+public interface MultiNonContainedUnsettableElement extends EObject
+{
+ /**
+ * 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.model4.model4Package#getMultiNonContainedUnsettableElement_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#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>Parent</b></em>' reference. It is bidirectional and its opposite is '
+ * {@link org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable#getElements <em>Elements</em>}'. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Parent</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Parent</em>' reference.
+ * @see #isSetParent()
+ * @see #unsetParent()
+ * @see #setParent(RefMultiNonContainedUnsettable)
+ * @see org.eclipse.emf.cdo.tests.model4.model4Package#getMultiNonContainedUnsettableElement_Parent()
+ * @see org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable#getElements
+ * @model opposite="elements" unsettable="true"
+ * @generated
+ */
+ RefMultiNonContainedUnsettable getParent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent
+ * <em>Parent</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Parent</em>' reference.
+ * @see #isSetParent()
+ * @see #unsetParent()
+ * @see #getParent()
+ * @generated
+ */
+ void setParent(RefMultiNonContainedUnsettable value);
+
+ /**
+ * Unsets the value of the '{@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent
+ * <em>Parent</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #isSetParent()
+ * @see #getParent()
+ * @see #setParent(RefMultiNonContainedUnsettable)
+ * @generated
+ */
+ void unsetParent();
+
+ /**
+ * Returns whether the value of the '
+ * {@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent <em>Parent</em>}' reference is
+ * set. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return whether the value of the '<em>Parent</em>' reference is set.
+ * @see #unsetParent()
+ * @see #getParent()
+ * @see #setParent(RefMultiNonContainedUnsettable)
+ * @generated
+ */
+ boolean isSetParent();
+
+} // MultiNonContainedUnsettableElement
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/RefMultiNonContainedUnsettable.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/RefMultiNonContainedUnsettable.java
new file mode 100644
index 0000000..465dc8e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/RefMultiNonContainedUnsettable.java
@@ -0,0 +1,75 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model4;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Ref Multi Non Contained Unsettable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model4.model4Package#getRefMultiNonContainedUnsettable()
+ * @model
+ * @generated
+ */
+public interface RefMultiNonContainedUnsettable extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Elements</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement}. It is bidirectional and its opposite
+ * is '{@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent <em>Parent</em>}'. <!--
+ * begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Elements</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>Elements</em>' reference list.
+ * @see #isSetElements()
+ * @see #unsetElements()
+ * @see org.eclipse.emf.cdo.tests.model4.model4Package#getRefMultiNonContainedUnsettable_Elements()
+ * @see org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent
+ * @model opposite="parent" unsettable="true"
+ * @generated
+ */
+ EList<MultiNonContainedUnsettableElement> getElements();
+
+ /**
+ * Unsets the value of the '{@link org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable#getElements
+ * <em>Elements</em>}' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #isSetElements()
+ * @see #getElements()
+ * @generated
+ */
+ void unsetElements();
+
+ /**
+ * Returns whether the value of the '
+ * {@link org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable#getElements <em>Elements</em>}' reference
+ * list is set. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return whether the value of the '<em>Elements</em>' reference list is set.
+ * @see #unsetElements()
+ * @see #getElements()
+ * @generated
+ */
+ boolean isSetElements();
+
+} // RefMultiNonContainedUnsettable
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/MultiNonContainedUnsettableElementImpl.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/MultiNonContainedUnsettableElementImpl.java
new file mode 100644
index 0000000..4b61da3
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/MultiNonContainedUnsettableElementImpl.java
@@ -0,0 +1,129 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model4.impl;
+
+import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement;
+import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
+import org.eclipse.emf.cdo.tests.model4.model4Package;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Multi Non Contained Unsettable Element</b></em>
+ * '. <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model4.impl.MultiNonContainedUnsettableElementImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model4.impl.MultiNonContainedUnsettableElementImpl#getParent <em>Parent</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MultiNonContainedUnsettableElementImpl extends CDOObjectImpl implements MultiNonContainedUnsettableElement
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected MultiNonContainedUnsettableElementImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return model4Package.Literals.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getName()
+ {
+ return (String)eGet(model4Package.Literals.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__NAME, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setName(String newName)
+ {
+ eSet(model4Package.Literals.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__NAME, newName);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public RefMultiNonContainedUnsettable getParent()
+ {
+ return (RefMultiNonContainedUnsettable)eGet(model4Package.Literals.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__PARENT,
+ true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setParent(RefMultiNonContainedUnsettable newParent)
+ {
+ eSet(model4Package.Literals.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__PARENT, newParent);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void unsetParent()
+ {
+ eUnset(model4Package.Literals.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__PARENT);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isSetParent()
+ {
+ return eIsSet(model4Package.Literals.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__PARENT);
+ }
+
+} // MultiNonContainedUnsettableElementImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/RefMultiNonContainedUnsettableImpl.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/RefMultiNonContainedUnsettableImpl.java
new file mode 100644
index 0000000..30318d1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/RefMultiNonContainedUnsettableImpl.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) 2004 - 2009 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model4.impl;
+
+import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement;
+import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
+import org.eclipse.emf.cdo.tests.model4.model4Package;
+
+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>Ref Multi Non Contained Unsettable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model4.impl.RefMultiNonContainedUnsettableImpl#getElements <em>Elements</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RefMultiNonContainedUnsettableImpl extends CDOObjectImpl implements RefMultiNonContainedUnsettable
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected RefMultiNonContainedUnsettableImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return model4Package.Literals.REF_MULTI_NON_CONTAINED_UNSETTABLE;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<MultiNonContainedUnsettableElement> getElements()
+ {
+ return (EList<MultiNonContainedUnsettableElement>)eGet(
+ model4Package.Literals.REF_MULTI_NON_CONTAINED_UNSETTABLE__ELEMENTS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void unsetElements()
+ {
+ eUnset(model4Package.Literals.REF_MULTI_NON_CONTAINED_UNSETTABLE__ELEMENTS);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isSetElements()
+ {
+ return eIsSet(model4Package.Literals.REF_MULTI_NON_CONTAINED_UNSETTABLE__ELEMENTS);
+ }
+
+} // RefMultiNonContainedUnsettableImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4FactoryImpl.java
index 438d324..12aefa3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4FactoryImpl.java
@@ -32,10 +32,12 @@ import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainer;
import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainerNPL;
import org.eclipse.emf.cdo.tests.model4.MultiContainedElement;
import org.eclipse.emf.cdo.tests.model4.MultiNonContainedElement;
+import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedNPL;
+import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
import org.eclipse.emf.cdo.tests.model4.RefSingleContained;
import org.eclipse.emf.cdo.tests.model4.RefSingleContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefSingleNonContained;
@@ -119,6 +121,10 @@ public class model4FactoryImpl extends EFactoryImpl implements model4Factory
return createRefMultiNonContained();
case model4Package.MULTI_NON_CONTAINED_ELEMENT:
return createMultiNonContainedElement();
+ case model4Package.REF_MULTI_NON_CONTAINED_UNSETTABLE:
+ return createRefMultiNonContainedUnsettable();
+ case model4Package.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT:
+ return createMultiNonContainedUnsettableElement();
case model4Package.REF_SINGLE_CONTAINED_NPL:
return createRefSingleContainedNPL();
case model4Package.REF_SINGLE_NON_CONTAINED_NPL:
@@ -267,6 +273,28 @@ public class model4FactoryImpl extends EFactoryImpl implements model4Factory
*
* @generated
*/
+ public RefMultiNonContainedUnsettable createRefMultiNonContainedUnsettable()
+ {
+ RefMultiNonContainedUnsettableImpl refMultiNonContainedUnsettable = new RefMultiNonContainedUnsettableImpl();
+ return refMultiNonContainedUnsettable;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public MultiNonContainedUnsettableElement createMultiNonContainedUnsettableElement()
+ {
+ MultiNonContainedUnsettableElementImpl multiNonContainedUnsettableElement = new MultiNonContainedUnsettableElementImpl();
+ return multiNonContainedUnsettableElement;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public RefSingleContainedNPL createRefSingleContainedNPL()
{
RefSingleContainedNPLImpl refSingleContainedNPL = new RefSingleContainedNPLImpl();
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4PackageImpl.java
index e335bf8..7a824da 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/impl/model4PackageImpl.java
@@ -32,10 +32,12 @@ import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainer;
import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainerNPL;
import org.eclipse.emf.cdo.tests.model4.MultiContainedElement;
import org.eclipse.emf.cdo.tests.model4.MultiNonContainedElement;
+import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedNPL;
+import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
import org.eclipse.emf.cdo.tests.model4.RefSingleContained;
import org.eclipse.emf.cdo.tests.model4.RefSingleContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefSingleNonContained;
@@ -122,6 +124,20 @@ public class model4PackageImpl extends EPackageImpl implements model4Package
*
* @generated
*/
+ private EClass refMultiNonContainedUnsettableEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass multiNonContainedUnsettableElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
private EClass refSingleContainedNPLEClass = null;
/**
@@ -319,15 +335,9 @@ public class model4PackageImpl extends EPackageImpl implements model4Package
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- * Simple dependencies are satisfied by calling this method on all dependent packages before doing anything else. This
- * method drives initialization for interdependent packages directly, in parallel with this package, itself.
* <p>
- * Of this package and its interdependencies, all packages which have not yet been registered by their URI values are
- * first created and registered. The packages are then initialized in two steps: meta-model objects for all of the
- * packages are created before any are initialized, since one package's meta-model objects may refer to those of
- * another.
- * <p>
- * Invocation of this method will not affect any packages that have already been initialized. <!-- begin-user-doc -->
+ * This method is used to initialize {@link model4Package#eINSTANCE} when that field is accessed. Clients should not
+ * invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @see #eNS_URI
@@ -341,8 +351,8 @@ public class model4PackageImpl extends EPackageImpl implements model4Package
return (model4Package)EPackage.Registry.INSTANCE.getEPackage(model4Package.eNS_URI);
// Obtain or create and register package
- model4PackageImpl themodel4Package = (model4PackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof model4PackageImpl ? EPackage.Registry.INSTANCE
- .getEPackage(eNS_URI)
+ model4PackageImpl themodel4Package = (model4PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof model4PackageImpl ? EPackage.Registry.INSTANCE
+ .get(eNS_URI)
: new model4PackageImpl());
isInited = true;
@@ -359,6 +369,8 @@ public class model4PackageImpl extends EPackageImpl implements model4Package
// Mark meta-data to indicate it can't be changed
themodel4Package.freeze();
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(model4Package.eNS_URI, themodel4Package);
return themodel4Package;
}
@@ -567,6 +579,56 @@ public class model4PackageImpl extends EPackageImpl implements model4Package
*
* @generated
*/
+ public EClass getRefMultiNonContainedUnsettable()
+ {
+ return refMultiNonContainedUnsettableEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getRefMultiNonContainedUnsettable_Elements()
+ {
+ return (EReference)refMultiNonContainedUnsettableEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EClass getMultiNonContainedUnsettableElement()
+ {
+ return multiNonContainedUnsettableElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getMultiNonContainedUnsettableElement_Name()
+ {
+ return (EAttribute)multiNonContainedUnsettableElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EReference getMultiNonContainedUnsettableElement_Parent()
+ {
+ return (EReference)multiNonContainedUnsettableElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EClass getRefSingleContainedNPL()
{
return refSingleContainedNPLEClass;
@@ -1040,6 +1102,13 @@ public class model4PackageImpl extends EPackageImpl implements model4Package
createEAttribute(multiNonContainedElementEClass, MULTI_NON_CONTAINED_ELEMENT__NAME);
createEReference(multiNonContainedElementEClass, MULTI_NON_CONTAINED_ELEMENT__PARENT);
+ refMultiNonContainedUnsettableEClass = createEClass(REF_MULTI_NON_CONTAINED_UNSETTABLE);
+ createEReference(refMultiNonContainedUnsettableEClass, REF_MULTI_NON_CONTAINED_UNSETTABLE__ELEMENTS);
+
+ multiNonContainedUnsettableElementEClass = createEClass(MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT);
+ createEAttribute(multiNonContainedUnsettableElementEClass, MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__NAME);
+ createEReference(multiNonContainedUnsettableElementEClass, MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__PARENT);
+
refSingleContainedNPLEClass = createEClass(REF_SINGLE_CONTAINED_NPL);
createEReference(refSingleContainedNPLEClass, REF_SINGLE_CONTAINED_NPL__ELEMENT);
@@ -1228,6 +1297,23 @@ public class model4PackageImpl extends EPackageImpl implements model4Package
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
+ initEClass(refMultiNonContainedUnsettableEClass, RefMultiNonContainedUnsettable.class,
+ "RefMultiNonContainedUnsettable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRefMultiNonContainedUnsettable_Elements(), this.getMultiNonContainedUnsettableElement(), this
+ .getMultiNonContainedUnsettableElement_Parent(), "elements", null, 0, -1, RefMultiNonContainedUnsettable.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
+ initEClass(multiNonContainedUnsettableElementEClass, MultiNonContainedUnsettableElement.class,
+ "MultiNonContainedUnsettableElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMultiNonContainedUnsettableElement_Name(), ecorePackage.getEString(), "name", null, 0, 1,
+ MultiNonContainedUnsettableElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID,
+ IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getMultiNonContainedUnsettableElement_Parent(), this.getRefMultiNonContainedUnsettable(), this
+ .getRefMultiNonContainedUnsettable_Elements(), "parent", null, 0, 1, MultiNonContainedUnsettableElement.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, IS_UNSETTABLE, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
initEClass(refSingleContainedNPLEClass, RefSingleContainedNPL.class, "RefSingleContainedNPL", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getRefSingleContainedNPL_Element(), this.getContainedElementNoOpposite(), null, "element", null, 0,
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Factory.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Factory.java
index 124fc32..42a4958 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Factory.java
@@ -94,6 +94,24 @@ public interface model4Factory extends EFactory
MultiNonContainedElement createMultiNonContainedElement();
/**
+ * Returns a new object of class '<em>Ref Multi Non Contained Unsettable</em>'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return a new object of class '<em>Ref Multi Non Contained Unsettable</em>'.
+ * @generated
+ */
+ RefMultiNonContainedUnsettable createRefMultiNonContainedUnsettable();
+
+ /**
+ * Returns a new object of class '<em>Multi Non Contained Unsettable Element</em>'. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @return a new object of class '<em>Multi Non Contained Unsettable Element</em>'.
+ * @generated
+ */
+ MultiNonContainedUnsettableElement createMultiNonContainedUnsettableElement();
+
+ /**
* Returns a new object of class '<em>Ref Single Contained NPL</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return a new object of class '<em>Ref Single Contained NPL</em>'.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Package.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Package.java
index bb390dc..9b36d88 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/model4Package.java
@@ -312,6 +312,68 @@ public interface model4Package extends EPackage
int MULTI_NON_CONTAINED_ELEMENT_FEATURE_COUNT = 2;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model4.impl.RefMultiNonContainedUnsettableImpl
+ * <em>Ref Multi Non Contained Unsettable</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model4.impl.RefMultiNonContainedUnsettableImpl
+ * @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getRefMultiNonContainedUnsettable()
+ * @generated
+ */
+ int REF_MULTI_NON_CONTAINED_UNSETTABLE = 8;
+
+ /**
+ * The feature id for the '<em><b>Elements</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REF_MULTI_NON_CONTAINED_UNSETTABLE__ELEMENTS = 0;
+
+ /**
+ * The number of structural features of the '<em>Ref Multi Non Contained Unsettable</em>' class. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int REF_MULTI_NON_CONTAINED_UNSETTABLE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model4.impl.MultiNonContainedUnsettableElementImpl
+ * <em>Multi Non Contained Unsettable Element</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model4.impl.MultiNonContainedUnsettableElementImpl
+ * @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getMultiNonContainedUnsettableElement()
+ * @generated
+ */
+ int MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT = 9;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Parent</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__PARENT = 1;
+
+ /**
+ * The number of structural features of the '<em>Multi Non Contained Unsettable Element</em>' class. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT_FEATURE_COUNT = 2;
+
+ /**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model4.impl.RefSingleContainedNPLImpl
* <em>Ref Single Contained NPL</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -319,7 +381,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getRefSingleContainedNPL()
* @generated
*/
- int REF_SINGLE_CONTAINED_NPL = 8;
+ int REF_SINGLE_CONTAINED_NPL = 10;
/**
* The feature id for the '<em><b>Element</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc
@@ -347,7 +409,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getRefSingleNonContainedNPL()
* @generated
*/
- int REF_SINGLE_NON_CONTAINED_NPL = 9;
+ int REF_SINGLE_NON_CONTAINED_NPL = 11;
/**
* The feature id for the '<em><b>Element</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -374,7 +436,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getRefMultiContainedNPL()
* @generated
*/
- int REF_MULTI_CONTAINED_NPL = 10;
+ int REF_MULTI_CONTAINED_NPL = 12;
/**
* The feature id for the '<em><b>Elements</b></em>' containment reference list. <!-- begin-user-doc --> <!--
@@ -402,7 +464,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getRefMultiNonContainedNPL()
* @generated
*/
- int REF_MULTI_NON_CONTAINED_NPL = 11;
+ int REF_MULTI_NON_CONTAINED_NPL = 13;
/**
* The feature id for the '<em><b>Elements</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -429,7 +491,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getContainedElementNoOpposite()
* @generated
*/
- int CONTAINED_ELEMENT_NO_OPPOSITE = 12;
+ int CONTAINED_ELEMENT_NO_OPPOSITE = 14;
/**
* The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -456,7 +518,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getGenRefSingleContained()
* @generated
*/
- int GEN_REF_SINGLE_CONTAINED = 13;
+ int GEN_REF_SINGLE_CONTAINED = 15;
/**
* The feature id for the '<em><b>Element</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc
@@ -484,7 +546,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getGenRefSingleNonContained()
* @generated
*/
- int GEN_REF_SINGLE_NON_CONTAINED = 14;
+ int GEN_REF_SINGLE_NON_CONTAINED = 16;
/**
* The feature id for the '<em><b>Element</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -511,7 +573,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getGenRefMultiContained()
* @generated
*/
- int GEN_REF_MULTI_CONTAINED = 15;
+ int GEN_REF_MULTI_CONTAINED = 17;
/**
* The feature id for the '<em><b>Elements</b></em>' containment reference list. <!-- begin-user-doc --> <!--
@@ -539,7 +601,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getGenRefMultiNonContained()
* @generated
*/
- int GEN_REF_MULTI_NON_CONTAINED = 16;
+ int GEN_REF_MULTI_NON_CONTAINED = 18;
/**
* The feature id for the '<em><b>Elements</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -566,7 +628,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplSingleRefContainer()
* @generated
*/
- int IMPL_SINGLE_REF_CONTAINER = 17;
+ int IMPL_SINGLE_REF_CONTAINER = 19;
/**
* The feature id for the '<em><b>Element</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc
@@ -594,7 +656,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplSingleRefContainedElement()
* @generated
*/
- int IMPL_SINGLE_REF_CONTAINED_ELEMENT = 18;
+ int IMPL_SINGLE_REF_CONTAINED_ELEMENT = 20;
/**
* The feature id for the '<em><b>Parent</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -629,7 +691,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplSingleRefNonContainer()
* @generated
*/
- int IMPL_SINGLE_REF_NON_CONTAINER = 19;
+ int IMPL_SINGLE_REF_NON_CONTAINER = 21;
/**
* The feature id for the '<em><b>Element</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -656,7 +718,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplSingleRefNonContainedElement()
* @generated
*/
- int IMPL_SINGLE_REF_NON_CONTAINED_ELEMENT = 20;
+ int IMPL_SINGLE_REF_NON_CONTAINED_ELEMENT = 22;
/**
* The feature id for the '<em><b>Parent</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -691,7 +753,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplMultiRefNonContainer()
* @generated
*/
- int IMPL_MULTI_REF_NON_CONTAINER = 21;
+ int IMPL_MULTI_REF_NON_CONTAINER = 23;
/**
* The feature id for the '<em><b>Elements</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -718,7 +780,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplMultiRefNonContainedElement()
* @generated
*/
- int IMPL_MULTI_REF_NON_CONTAINED_ELEMENT = 22;
+ int IMPL_MULTI_REF_NON_CONTAINED_ELEMENT = 24;
/**
* The feature id for the '<em><b>Parent</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -753,7 +815,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplMultiRefContainer()
* @generated
*/
- int IMPL_MULTI_REF_CONTAINER = 23;
+ int IMPL_MULTI_REF_CONTAINER = 25;
/**
* The feature id for the '<em><b>Elements</b></em>' containment reference list. <!-- begin-user-doc --> <!--
@@ -781,7 +843,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplMultiRefContainedElement()
* @generated
*/
- int IMPL_MULTI_REF_CONTAINED_ELEMENT = 24;
+ int IMPL_MULTI_REF_CONTAINED_ELEMENT = 26;
/**
* The feature id for the '<em><b>Parent</b></em>' container reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -816,7 +878,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplSingleRefContainerNPL()
* @generated
*/
- int IMPL_SINGLE_REF_CONTAINER_NPL = 25;
+ int IMPL_SINGLE_REF_CONTAINER_NPL = 27;
/**
* The feature id for the '<em><b>Element</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc
@@ -844,7 +906,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplSingleRefNonContainerNPL()
* @generated
*/
- int IMPL_SINGLE_REF_NON_CONTAINER_NPL = 26;
+ int IMPL_SINGLE_REF_NON_CONTAINER_NPL = 28;
/**
* The feature id for the '<em><b>Element</b></em>' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -871,7 +933,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplMultiRefContainerNPL()
* @generated
*/
- int IMPL_MULTI_REF_CONTAINER_NPL = 27;
+ int IMPL_MULTI_REF_CONTAINER_NPL = 29;
/**
* The feature id for the '<em><b>Elements</b></em>' containment reference list. <!-- begin-user-doc --> <!--
@@ -899,7 +961,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplMultiRefNonContainerNPL()
* @generated
*/
- int IMPL_MULTI_REF_NON_CONTAINER_NPL = 28;
+ int IMPL_MULTI_REF_NON_CONTAINER_NPL = 30;
/**
* The feature id for the '<em><b>Elements</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -926,7 +988,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getImplContainedElementNPL()
* @generated
*/
- int IMPL_CONTAINED_ELEMENT_NPL = 29;
+ int IMPL_CONTAINED_ELEMENT_NPL = 31;
/**
* The feature id for the '<em><b>Name</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -953,7 +1015,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getGenRefMultiNUNonContained()
* @generated
*/
- int GEN_REF_MULTI_NU_NON_CONTAINED = 30;
+ int GEN_REF_MULTI_NU_NON_CONTAINED = 32;
/**
* The feature id for the '<em><b>Elements</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -980,7 +1042,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getGenRefMapNonContained()
* @generated
*/
- int GEN_REF_MAP_NON_CONTAINED = 31;
+ int GEN_REF_MAP_NON_CONTAINED = 33;
/**
* The feature id for the '<em><b>Elements</b></em>' map. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -1007,7 +1069,7 @@ public interface model4Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getStringToEObject()
* @generated
*/
- int STRING_TO_EOBJECT = 32;
+ int STRING_TO_EOBJECT = 34;
/**
* The feature id for the '<em><b>Key</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -1257,6 +1319,62 @@ public interface model4Package extends EPackage
EReference getMultiNonContainedElement_Parent();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable
+ * <em>Ref Multi Non Contained Unsettable</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Ref Multi Non Contained Unsettable</em>'.
+ * @see org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable
+ * @generated
+ */
+ EClass getRefMultiNonContainedUnsettable();
+
+ /**
+ * Returns the meta object for the reference list '
+ * {@link org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable#getElements <em>Elements</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Elements</em>'.
+ * @see org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable#getElements()
+ * @see #getRefMultiNonContainedUnsettable()
+ * @generated
+ */
+ EReference getRefMultiNonContainedUnsettable_Elements();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement
+ * <em>Multi Non Contained Unsettable Element</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Multi Non Contained Unsettable Element</em>'.
+ * @see org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement
+ * @generated
+ */
+ EClass getMultiNonContainedUnsettableElement();
+
+ /**
+ * Returns the meta object for the attribute '
+ * {@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#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.model4.MultiNonContainedUnsettableElement#getName()
+ * @see #getMultiNonContainedUnsettableElement()
+ * @generated
+ */
+ EAttribute getMultiNonContainedUnsettableElement_Name();
+
+ /**
+ * Returns the meta object for the reference '
+ * {@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent <em>Parent</em>}'. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Parent</em>'.
+ * @see org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement#getParent()
+ * @see #getMultiNonContainedUnsettableElement()
+ * @generated
+ */
+ EReference getMultiNonContainedUnsettableElement_Parent();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model4.RefSingleContainedNPL
* <em>Ref Single Contained NPL</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -1908,6 +2026,52 @@ public interface model4Package extends EPackage
EReference MULTI_NON_CONTAINED_ELEMENT__PARENT = eINSTANCE.getMultiNonContainedElement_Parent();
/**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model4.impl.RefMultiNonContainedUnsettableImpl
+ * <em>Ref Multi Non Contained Unsettable</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model4.impl.RefMultiNonContainedUnsettableImpl
+ * @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getRefMultiNonContainedUnsettable()
+ * @generated
+ */
+ EClass REF_MULTI_NON_CONTAINED_UNSETTABLE = eINSTANCE.getRefMultiNonContainedUnsettable();
+
+ /**
+ * The meta object literal for the '<em><b>Elements</b></em>' reference list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference REF_MULTI_NON_CONTAINED_UNSETTABLE__ELEMENTS = eINSTANCE.getRefMultiNonContainedUnsettable_Elements();
+
+ /**
+ * The meta object literal for the '
+ * {@link org.eclipse.emf.cdo.tests.model4.impl.MultiNonContainedUnsettableElementImpl
+ * <em>Multi Non Contained Unsettable Element</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model4.impl.MultiNonContainedUnsettableElementImpl
+ * @see org.eclipse.emf.cdo.tests.model4.impl.model4PackageImpl#getMultiNonContainedUnsettableElement()
+ * @generated
+ */
+ EClass MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT = eINSTANCE.getMultiNonContainedUnsettableElement();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__NAME = eINSTANCE.getMultiNonContainedUnsettableElement_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Parent</b></em>' reference feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT__PARENT = eINSTANCE
+ .getMultiNonContainedUnsettableElement_Parent();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model4.impl.RefSingleContainedNPLImpl
* <em>Ref Single Contained NPL</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4AdapterFactory.java
index 597e318..145e79d 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4AdapterFactory.java
@@ -32,10 +32,12 @@ import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainer;
import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainerNPL;
import org.eclipse.emf.cdo.tests.model4.MultiContainedElement;
import org.eclipse.emf.cdo.tests.model4.MultiNonContainedElement;
+import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedNPL;
+import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
import org.eclipse.emf.cdo.tests.model4.RefSingleContained;
import org.eclipse.emf.cdo.tests.model4.RefSingleContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefSingleNonContained;
@@ -172,6 +174,18 @@ public class model4AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseRefMultiNonContainedUnsettable(RefMultiNonContainedUnsettable object)
+ {
+ return createRefMultiNonContainedUnsettableAdapter();
+ }
+
+ @Override
+ public Adapter caseMultiNonContainedUnsettableElement(MultiNonContainedUnsettableElement object)
+ {
+ return createMultiNonContainedUnsettableElementAdapter();
+ }
+
+ @Override
public Adapter caseRefSingleContainedNPL(RefSingleContainedNPL object)
{
return createRefSingleContainedNPLAdapter();
@@ -547,6 +561,37 @@ public class model4AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable <em>Ref Multi Non Contained Unsettable</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.model4.RefMultiNonContainedUnsettable
+ * @generated
+ */
+ public Adapter createRefMultiNonContainedUnsettableAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '
+ * {@link org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement
+ * <em>Multi Non Contained Unsettable Element</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.model4.MultiNonContainedUnsettableElement
+ * @generated
+ */
+ public Adapter createMultiNonContainedUnsettableElementAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model4.RefSingleContainedNPL
* <em>Ref Single Contained NPL</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. <!--
diff --git a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4Switch.java b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4Switch.java
index f914c4e..01524c2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model4/src/org/eclipse/emf/cdo/tests/model4/util/model4Switch.java
@@ -32,10 +32,12 @@ import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainer;
import org.eclipse.emf.cdo.tests.model4.ImplSingleRefNonContainerNPL;
import org.eclipse.emf.cdo.tests.model4.MultiContainedElement;
import org.eclipse.emf.cdo.tests.model4.MultiNonContainedElement;
+import org.eclipse.emf.cdo.tests.model4.MultiNonContainedUnsettableElement;
import org.eclipse.emf.cdo.tests.model4.RefMultiContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContained;
import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedNPL;
+import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
import org.eclipse.emf.cdo.tests.model4.RefSingleContained;
import org.eclipse.emf.cdo.tests.model4.RefSingleContainedNPL;
import org.eclipse.emf.cdo.tests.model4.RefSingleNonContained;
@@ -202,6 +204,22 @@ public class model4Switch<T>
result = defaultCase(theEObject);
return result;
}
+ case model4Package.REF_MULTI_NON_CONTAINED_UNSETTABLE:
+ {
+ RefMultiNonContainedUnsettable refMultiNonContainedUnsettable = (RefMultiNonContainedUnsettable)theEObject;
+ T result = caseRefMultiNonContainedUnsettable(refMultiNonContainedUnsettable);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
+ case model4Package.MULTI_NON_CONTAINED_UNSETTABLE_ELEMENT:
+ {
+ MultiNonContainedUnsettableElement multiNonContainedUnsettableElement = (MultiNonContainedUnsettableElement)theEObject;
+ T result = caseMultiNonContainedUnsettableElement(multiNonContainedUnsettableElement);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
case model4Package.REF_SINGLE_CONTAINED_NPL:
{
RefSingleContainedNPL refSingleContainedNPL = (RefSingleContainedNPL)theEObject;
@@ -564,6 +582,38 @@ public class model4Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Ref Multi Non Contained Unsettable</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>Ref Multi Non Contained Unsettable</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRefMultiNonContainedUnsettable(RefMultiNonContainedUnsettable object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Multi Non Contained Unsettable Element</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>Multi Non Contained Unsettable Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMultiNonContainedUnsettableElement(MultiNonContainedUnsettableElement object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Ref Single Contained NPL</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/AllTestsAllConfigs.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java
index d38fc62..c6902d1 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllTestsAllConfigs.java
@@ -55,6 +55,7 @@ import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_278900_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_283985_CDOTest;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_283985_CDOTest2;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_283985_SavePointTest;
+import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_285008_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_289932_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_294850_Test;
import org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_294859_Test;
@@ -162,6 +163,7 @@ public abstract class AllTestsAllConfigs extends ConfigTestSuite
testClasses.add(Bugzilla_283985_CDOTest.class);
testClasses.add(Bugzilla_283985_CDOTest2.class);
testClasses.add(Bugzilla_283985_SavePointTest.class);
+ testClasses.add(Bugzilla_285008_Test.class);
testClasses.add(Bugzilla_294850_Test.class);
testClasses.add(Bugzilla_294859_Test.class);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_285008_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_285008_Test.java
new file mode 100644
index 0000000..a84afa4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_285008_Test.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2004 - 2009 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:
+ * Caspar De Groot - 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.model4.MultiNonContainedUnsettableElement;
+import org.eclipse.emf.cdo.tests.model4.RefMultiNonContainedUnsettable;
+import org.eclipse.emf.cdo.tests.model4.model4Factory;
+import org.eclipse.emf.cdo.tests.model4.model4Package;
+import org.eclipse.emf.cdo.transaction.CDOTransaction;
+
+/**
+ * @author Caspar De Groot
+ */
+public class Bugzilla_285008_Test extends AbstractCDOTest
+{
+ private static String RESOURCENAME = "/r1";
+
+ public void testCDO_isSet()
+ {
+ {
+ CDOSession session = openSession();
+ model4Package p = model4Package.eINSTANCE;
+ session.getPackageRegistry().putEPackage(p);
+ session.options().setPassiveUpdateEnabled(false);
+ model4Factory f = model4Factory.eINSTANCE;
+
+ // Ensure that model is suitable for this test
+ boolean p1 = p.getRefMultiNonContainedUnsettable_Elements().isMany();
+ boolean p2 = p.getRefMultiNonContainedUnsettable_Elements().isUnsettable();
+ boolean p3 = !p.getMultiNonContainedUnsettableElement_Parent().isMany();
+ boolean p4 = p.getMultiNonContainedUnsettableElement_Parent().isUnsettable();
+ boolean p5 = p.getRefMultiNonContainedUnsettable_Elements().getEOpposite() == p
+ .getMultiNonContainedUnsettableElement_Parent();
+ if (!p1 || !p2 || !p3 || !p4 || !p5)
+ {
+ throw new RuntimeException("Model does not meet the prerequirements for this test");
+ }
+
+ CDOTransaction tx = session.openTransaction();
+ CDOResource r1 = tx.createResource(RESOURCENAME);
+ RefMultiNonContainedUnsettable a = f.createRefMultiNonContainedUnsettable();
+ MultiNonContainedUnsettableElement b = f.createMultiNonContainedUnsettableElement();
+ r1.getContents().add(a);
+ r1.getContents().add(b);
+ a.getElements().add(b);
+
+ assertTrue(a.isSetElements());
+
+ tx.commit();
+
+ assertTrue(a.isSetElements());
+
+ tx.close();
+ session.close();
+ }
+
+ // Same tests on isSetElements, but in a new session
+ {
+ CDOSession session = openSession();
+ model4Package p = model4Package.eINSTANCE;
+ session.getPackageRegistry().putEPackage(p);
+ session.options().setPassiveUpdateEnabled(false);
+ CDOTransaction tx = session.openTransaction();
+
+ CDOResource r1 = tx.getResource(RESOURCENAME);
+ RefMultiNonContainedUnsettable a = (RefMultiNonContainedUnsettable)r1.getContents().get(0);
+
+ assertTrue(a.isSetElements());
+
+ tx.close();
+ session.close();
+ }
+ }
+
+ public void testCDO_crossReferences()
+ {
+ {
+ CDOSession session = openSession();
+ model4Package p = model4Package.eINSTANCE;
+ session.getPackageRegistry().putEPackage(p);
+ session.options().setPassiveUpdateEnabled(false);
+ model4Factory f = model4Factory.eINSTANCE;
+
+ // Ensure that model is suitable for this test
+ boolean p1 = p.getRefMultiNonContainedUnsettable_Elements().isMany();
+ boolean p2 = p.getRefMultiNonContainedUnsettable_Elements().isUnsettable();
+ boolean p3 = !p.getMultiNonContainedUnsettableElement_Parent().isMany();
+ boolean p4 = p.getMultiNonContainedUnsettableElement_Parent().isUnsettable();
+ boolean p5 = p.getRefMultiNonContainedUnsettable_Elements().getEOpposite() == p
+ .getMultiNonContainedUnsettableElement_Parent();
+ if (!p1 || !p2 || !p3 || !p4 || !p5)
+ {
+ throw new RuntimeException("Model does not meet the prerequirements for this test");
+ }
+
+ CDOTransaction tx = session.openTransaction();
+ CDOResource r1 = tx.createResource(RESOURCENAME);
+ RefMultiNonContainedUnsettable a = f.createRefMultiNonContainedUnsettable();
+ MultiNonContainedUnsettableElement b = f.createMultiNonContainedUnsettableElement();
+ r1.getContents().add(a);
+ r1.getContents().add(b);
+ a.getElements().add(b);
+ tx.commit();
+
+ assertEquals(1, a.eCrossReferences().size());
+ assertSame(b, a.eCrossReferences().get(0));
+
+ assertEquals(1, b.eCrossReferences().size());
+ assertSame(a, b.eCrossReferences().get(0));
+
+ tx.close();
+ session.close();
+ }
+
+ // Same tests on eCrossReferences, but in a new session
+ {
+ CDOSession session = openSession();
+ model4Package p = model4Package.eINSTANCE;
+ session.getPackageRegistry().putEPackage(p);
+ session.options().setPassiveUpdateEnabled(false);
+ CDOTransaction tx = session.openTransaction();
+
+ CDOResource r1 = tx.getResource(RESOURCENAME);
+ RefMultiNonContainedUnsettable a = (RefMultiNonContainedUnsettable)r1.getContents().get(0);
+ MultiNonContainedUnsettableElement b = (MultiNonContainedUnsettableElement)r1.getContents().get(1);
+
+ assertEquals(1, a.eCrossReferences().size());
+ assertSame(b, a.eCrossReferences().get(0));
+
+ assertEquals(1, b.eCrossReferences().size());
+ assertSame(a, b.eCrossReferences().get(0));
+
+ tx.close();
+ session.close();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index 60b68af..316782c 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -51,6 +51,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EStoreEObjectImpl;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.Resource.Internal;
+import org.eclipse.emf.ecore.util.DelegatingEcoreEList;
import org.eclipse.emf.ecore.util.DelegatingFeatureMap;
import org.eclipse.emf.ecore.util.EcoreEList;
import org.eclipse.emf.ecore.util.EcoreEMap;
@@ -61,6 +62,7 @@ import org.eclipse.emf.spi.cdo.InternalCDOLoadable;
import org.eclipse.emf.spi.cdo.InternalCDOObject;
import org.eclipse.emf.spi.cdo.InternalCDOView;
+import java.lang.reflect.Field;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
@@ -916,7 +918,45 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
return new EStoreEcoreEMap();
}
- return super.createList(eStructuralFeature);
+ EList<?> list = super.createList(eStructuralFeature);
+ workaround_Bugzilla285008(list);
+ return list;
+ }
+
+ /**
+ * DelegatingEcoreEList.Generic fails to set the IS_SET bit in its "kind" field on construction. This workaround
+ * "fixes" the list when necessary.
+ *
+ * @author Caspar De Groot
+ */
+ private void workaround_Bugzilla285008(EList<?> list)
+ {
+ if (list instanceof DelegatingEcoreEList.Generic<?>)
+ {
+ DelegatingEcoreEList.Generic<?> dlist = (DelegatingEcoreEList.Generic<?>)list;
+ if (!dlist.isEmpty() && !dlist.isSet())
+ {
+ try
+ {
+ // Use reflection to access the protected "kind" field
+ Field kindField = DelegatingEcoreEList.Generic.class.getDeclaredField("kind");
+ kindField.setAccessible(true);
+ Object o = kindField.get(dlist);
+
+ if (o instanceof Integer)
+ {
+ // Poke the bit and write it back
+ int kind = ((Integer)o).intValue();
+ kind |= DelegatingEcoreEList.Generic.IS_SET;
+ kindField.set(dlist, new Integer(kind));
+ }
+ }
+ catch (Exception ex)
+ {
+ OM.LOG.error("Bugzilla 285008 workaround failed", ex);
+ }
+ }
+ }
}
@Override