summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-12-19 05:29:33 (EST)
committerEike Stepper2006-12-19 05:29:33 (EST)
commit1aeb68dda313ce8ed042605101b69f9291f56a53 (patch)
treefb467360eaff70b8cf125363290c295279feac94
parent06b389b4de15ba2bd1a486685e79885143048f4f (diff)
downloadcdo-1aeb68dda313ce8ed042605101b69f9291f56a53.zip
cdo-1aeb68dda313ce8ed042605101b69f9291f56a53.tar.gz
cdo-1aeb68dda313ce8ed042605101b69f9291f56a53.tar.bz2
[160832] Object deletion leaves some opposite references - https://bugs.eclipse.org/bugs/show_bug.cgi?id=160832
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla160832Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java173
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java85
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java288
8 files changed, 602 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.core.resources.prefs
index b779a71..fb47c9b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.emf.cdo.tests/.settings/org.eclipse.core.resources.prefs
@@ -1,3 +1,4 @@
-#Wed Nov 01 06:51:23 CET 2006
+#Tue Dec 19 10:09:26 CET 2006
eclipse.preferences.version=1
encoding//launches/CDO\ All\ Tests.launch=UTF-8
+encoding//model/TestModel1.ecore=UTF-8
diff --git a/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch b/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
index 3bee233..92b5201 100644
--- a/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
+++ b/plugins/org.eclipse.emf.cdo.tests/launches/CDO All Tests.launch
@@ -10,7 +10,7 @@
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu,org.apache.ant,org.apache.xerces,org.eclipse.ant.core,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.filesystem,org.eclipse.core.filesystem.win32.x86,org.eclipse.core.jobs,org.eclipse.core.resources,org.eclipse.core.resources.compatibility,org.eclipse.core.resources.win32,org.eclipse.core.runtime,org.eclipse.core.runtime.compatibility,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.core.variables,org.eclipse.emf.common,org.eclipse.emf.ecore,org.eclipse.emf.ecore.change,org.eclipse.emf.ecore.edit,org.eclipse.emf.ecore.xmi,org.eclipse.emf.edit,org.eclipse.emf.ocl,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.osgi,org.eclipse.update.configurator,org.junit"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu,net.sourceforge.lpg.lpgjavaruntime,org.apache.ant,org.apache.xerces,org.eclipse.ant.core,org.eclipse.core.contenttype,org.eclipse.core.expressions,org.eclipse.core.filesystem,org.eclipse.core.filesystem.win32.x86,org.eclipse.core.jobs,org.eclipse.core.resources,org.eclipse.core.resources.compatibility,org.eclipse.core.resources.win32,org.eclipse.core.runtime,org.eclipse.core.runtime.compatibility,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.core.variables,org.eclipse.emf.common,org.eclipse.emf.ecore,org.eclipse.emf.ecore.change,org.eclipse.emf.ecore.edit,org.eclipse.emf.ecore.xmi,org.eclipse.emf.edit,org.eclipse.emf.ocl,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.osgi,org.eclipse.update.configurator,org.junit"/>
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
<booleanAttribute key="automaticValidate" value="true"/>
<booleanAttribute key="org.eclipse.hyades.trace.ui.ATTR_SHOW_HEAP_INSTANCES" value="true"/>
@@ -20,12 +20,12 @@
<booleanAttribute key="automaticAdd" value="false"/>
<stringAttribute key="checked" value="[NONE]"/>
<booleanAttribute key="org.eclipse.hyades.trace.ui.ATTR_PROFILE_TO_FILE" value="false"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.net4j.spring,org.eclipse.net4j.socket,org.eclipse.net4j.core,org.eclipse.net4j.spring.db,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.client,org.eclipse.net4j.util,org.eclipse.emf.cdo.server,org.eclipse.emf.cdo.client.ocl,org.eclipse.net4j.embedded,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.jdbc,org.eclipse.net4j.spring,org.eclipse.net4j.socket,org.eclipse.net4j.core,org.eclipse.net4j.spring.db,org.eclipse.emf.cdo.dbgen,org.eclipse.emf.cdo.tests,org.eclipse.emf.cdo.core,org.eclipse.emf.cdo.mapping,org.eclipse.emf.cdo.client,org.eclipse.net4j.util,org.eclipse.emf.cdo.client.ocl,org.eclipse.emf.cdo.server,org.eclipse.net4j.embedded,org.eclipse.emf.cdo.jdbc.derby,org.eclipse.emf.cdo.dbgen.derby,org.eclipse.emf.cdo.dbgen.oracle,org.eclipse.emf.cdo.jdbc.hsqldb,org.eclipse.emf.cdo.jdbc.mysql,org.eclipse.emf.cdo.dbgen.ansi92,org.eclipse.emf.cdo.dbgen.mysql,org.eclipse.emf.cdo.dbgen.hsqldb"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
-<booleanAttribute key="clearws" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<stringAttribute key="org.eclipse.hyades.trace.ui.ATTR_DESTINATION_MONITOR" value="DefaultMonitor"/>
+<booleanAttribute key="clearws" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.cdo.tests.model1.AllTests"/>
<stringAttribute key="pde.version" value="3.2a"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dcdo.test.mode=Client-Server"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
index 7581af6..7990b3c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests/model/TestModel1.ecore
@@ -14,6 +14,11 @@
eType="#//TreeNode" containment="true" eOpposite="#//TreeNode/parent2"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="references" upperBound="-1"
eType="#//TreeNode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="reference" eType="#//TreeNode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="sourceRef" eType="#//TreeNode"
+ eOpposite="#//TreeNode/targetRef"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="targetRef" eType="#//TreeNode"
+ eOpposite="#//TreeNode/sourceRef"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="booleanFeature" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="intFeature" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="stringFeature" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla160832Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla160832Test.java
index 219cc18..e399470 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla160832Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/Bugzilla160832Test.java
@@ -76,4 +76,8 @@ public class Bugzilla160832Test extends AbstractModel1Test
assertEquals(0, node1.getBidiTarget().size());
}
}
+
+ // public void testUnsetNonExistingRefs()
+ // {
+ // }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
index 6eb9dbd..809be8b 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TestModel1Package.java
@@ -120,13 +120,40 @@ public interface TestModel1Package extends EPackage
int TREE_NODE__REFERENCES = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 4;
/**
+ * The feature id for the '<em><b>Reference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__REFERENCE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Source Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__SOURCE_REF = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>Target Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TREE_NODE__TARGET_REF = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 7;
+
+ /**
* The feature id for the '<em><b>Boolean Feature</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int TREE_NODE__BOOLEAN_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 5;
+ int TREE_NODE__BOOLEAN_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 8;
/**
* The feature id for the '<em><b>Int Feature</b></em>' attribute.
@@ -135,7 +162,7 @@ public interface TestModel1Package extends EPackage
* @generated
* @ordered
*/
- int TREE_NODE__INT_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 6;
+ int TREE_NODE__INT_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 9;
/**
* The feature id for the '<em><b>String Feature</b></em>' attribute.
@@ -144,7 +171,7 @@ public interface TestModel1Package extends EPackage
* @generated
* @ordered
*/
- int TREE_NODE__STRING_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 7;
+ int TREE_NODE__STRING_FEATURE = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 10;
/**
* The number of structural features of the '<em>Tree Node</em>' class.
@@ -153,7 +180,7 @@ public interface TestModel1Package extends EPackage
* @generated
* @ordered
*/
- int TREE_NODE_FEATURE_COUNT = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 8;
+ int TREE_NODE_FEATURE_COUNT = CDOPackage.CDO_PERSISTENT_FEATURE_COUNT + 11;
/**
* The meta object id for the '{@link testmodel1.impl.ExtendedNodeImpl <em>Extended Node</em>}' class.
@@ -211,6 +238,33 @@ public interface TestModel1Package extends EPackage
int EXTENDED_NODE__REFERENCES = TREE_NODE__REFERENCES;
/**
+ * The feature id for the '<em><b>Reference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTENDED_NODE__REFERENCE = TREE_NODE__REFERENCE;
+
+ /**
+ * The feature id for the '<em><b>Source Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTENDED_NODE__SOURCE_REF = TREE_NODE__SOURCE_REF;
+
+ /**
+ * The feature id for the '<em><b>Target Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXTENDED_NODE__TARGET_REF = TREE_NODE__TARGET_REF;
+
+ /**
* The feature id for the '<em><b>Boolean Feature</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -329,6 +383,33 @@ public interface TestModel1Package extends EPackage
int EMPTY_NODE__REFERENCES = TREE_NODE__REFERENCES;
/**
+ * The feature id for the '<em><b>Reference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__REFERENCE = TREE_NODE__REFERENCE;
+
+ /**
+ * The feature id for the '<em><b>Source Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__SOURCE_REF = TREE_NODE__SOURCE_REF;
+
+ /**
+ * The feature id for the '<em><b>Target Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_NODE__TARGET_REF = TREE_NODE__TARGET_REF;
+
+ /**
* The feature id for the '<em><b>Boolean Feature</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -420,6 +501,33 @@ public interface TestModel1Package extends EPackage
int EMPTY_REF_NODE__REFERENCES = TREE_NODE__REFERENCES;
/**
+ * The feature id for the '<em><b>Reference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_REF_NODE__REFERENCE = TREE_NODE__REFERENCE;
+
+ /**
+ * The feature id for the '<em><b>Source Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_REF_NODE__SOURCE_REF = TREE_NODE__SOURCE_REF;
+
+ /**
+ * The feature id for the '<em><b>Target Ref</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_REF_NODE__TARGET_REF = TREE_NODE__TARGET_REF;
+
+ /**
* The feature id for the '<em><b>Boolean Feature</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -530,6 +638,39 @@ public interface TestModel1Package extends EPackage
EReference getTreeNode_References();
/**
+ * Returns the meta object for the reference '{@link testmodel1.TreeNode#getReference <em>Reference</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Reference</em>'.
+ * @see testmodel1.TreeNode#getReference()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EReference getTreeNode_Reference();
+
+ /**
+ * Returns the meta object for the reference '{@link testmodel1.TreeNode#getSourceRef <em>Source Ref</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Source Ref</em>'.
+ * @see testmodel1.TreeNode#getSourceRef()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EReference getTreeNode_SourceRef();
+
+ /**
+ * Returns the meta object for the reference '{@link testmodel1.TreeNode#getTargetRef <em>Target Ref</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Target Ref</em>'.
+ * @see testmodel1.TreeNode#getTargetRef()
+ * @see #getTreeNode()
+ * @generated
+ */
+ EReference getTreeNode_TargetRef();
+
+ /**
* Returns the meta object for the attribute '{@link testmodel1.TreeNode#isBooleanFeature <em>Boolean Feature</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -711,6 +852,30 @@ public interface TestModel1Package extends EPackage
EReference TREE_NODE__REFERENCES = eINSTANCE.getTreeNode_References();
/**
+ * The meta object literal for the '<em><b>Reference</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_NODE__REFERENCE = eINSTANCE.getTreeNode_Reference();
+
+ /**
+ * The meta object literal for the '<em><b>Source Ref</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_NODE__SOURCE_REF = eINSTANCE.getTreeNode_SourceRef();
+
+ /**
+ * The meta object literal for the '<em><b>Target Ref</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference TREE_NODE__TARGET_REF = eINSTANCE.getTreeNode_TargetRef();
+
+ /**
* The meta object literal for the '<em><b>Boolean Feature</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java
index b25ae55..a6e6224 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/TreeNode.java
@@ -25,6 +25,9 @@ import org.eclipse.emf.common.util.EList;
* <li>{@link testmodel1.TreeNode#getParent2 <em>Parent2</em>}</li>
* <li>{@link testmodel1.TreeNode#getChildren2 <em>Children2</em>}</li>
* <li>{@link testmodel1.TreeNode#getReferences <em>References</em>}</li>
+ * <li>{@link testmodel1.TreeNode#getReference <em>Reference</em>}</li>
+ * <li>{@link testmodel1.TreeNode#getSourceRef <em>Source Ref</em>}</li>
+ * <li>{@link testmodel1.TreeNode#getTargetRef <em>Target Ref</em>}</li>
* <li>{@link testmodel1.TreeNode#isBooleanFeature <em>Boolean Feature</em>}</li>
* <li>{@link testmodel1.TreeNode#getIntFeature <em>Int Feature</em>}</li>
* <li>{@link testmodel1.TreeNode#getStringFeature <em>String Feature</em>}</li>
@@ -146,6 +149,88 @@ public interface TreeNode extends CDOPersistent
EList getReferences();
/**
+ * Returns the value of the '<em><b>Reference</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Reference</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Reference</em>' reference.
+ * @see #setReference(TreeNode)
+ * @see testmodel1.TestModel1Package#getTreeNode_Reference()
+ * @model
+ * @generated
+ */
+ TreeNode getReference();
+
+ /**
+ * Sets the value of the '{@link testmodel1.TreeNode#getReference <em>Reference</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Reference</em>' reference.
+ * @see #getReference()
+ * @generated
+ */
+ void setReference(TreeNode value);
+
+ /**
+ * Returns the value of the '<em><b>Source Ref</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link testmodel1.TreeNode#getTargetRef <em>Target Ref</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source Ref</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source Ref</em>' reference.
+ * @see #setSourceRef(TreeNode)
+ * @see testmodel1.TestModel1Package#getTreeNode_SourceRef()
+ * @see testmodel1.TreeNode#getTargetRef
+ * @model opposite="targetRef"
+ * @generated
+ */
+ TreeNode getSourceRef();
+
+ /**
+ * Sets the value of the '{@link testmodel1.TreeNode#getSourceRef <em>Source Ref</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source Ref</em>' reference.
+ * @see #getSourceRef()
+ * @generated
+ */
+ void setSourceRef(TreeNode value);
+
+ /**
+ * Returns the value of the '<em><b>Target Ref</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link testmodel1.TreeNode#getSourceRef <em>Source Ref</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target Ref</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Target Ref</em>' reference.
+ * @see #setTargetRef(TreeNode)
+ * @see testmodel1.TestModel1Package#getTreeNode_TargetRef()
+ * @see testmodel1.TreeNode#getSourceRef
+ * @model opposite="sourceRef"
+ * @generated
+ */
+ TreeNode getTargetRef();
+
+ /**
+ * Sets the value of the '{@link testmodel1.TreeNode#getTargetRef <em>Target Ref</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Target Ref</em>' reference.
+ * @see #getTargetRef()
+ * @generated
+ */
+ void setTargetRef(TreeNode value);
+
+ /**
* Returns the value of the '<em><b>Boolean Feature</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java
index 28bc58c..71d5261 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TestModel1PackageImpl.java
@@ -200,9 +200,39 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getTreeNode_Reference()
+ {
+ return (EReference) treeNodeEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTreeNode_SourceRef()
+ {
+ return (EReference) treeNodeEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getTreeNode_TargetRef()
+ {
+ return (EReference) treeNodeEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EAttribute getTreeNode_BooleanFeature()
{
- return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(5);
+ return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(8);
}
/**
@@ -212,7 +242,7 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
*/
public EAttribute getTreeNode_IntFeature()
{
- return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(6);
+ return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(9);
}
/**
@@ -222,7 +252,7 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
*/
public EAttribute getTreeNode_StringFeature()
{
- return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(7);
+ return (EAttribute) treeNodeEClass.getEStructuralFeatures().get(10);
}
/**
@@ -331,6 +361,9 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
createEReference(treeNodeEClass, TREE_NODE__PARENT2);
createEReference(treeNodeEClass, TREE_NODE__CHILDREN2);
createEReference(treeNodeEClass, TREE_NODE__REFERENCES);
+ createEReference(treeNodeEClass, TREE_NODE__REFERENCE);
+ createEReference(treeNodeEClass, TREE_NODE__SOURCE_REF);
+ createEReference(treeNodeEClass, TREE_NODE__TARGET_REF);
createEAttribute(treeNodeEClass, TREE_NODE__BOOLEAN_FEATURE);
createEAttribute(treeNodeEClass, TREE_NODE__INT_FEATURE);
createEAttribute(treeNodeEClass, TREE_NODE__STRING_FEATURE);
@@ -398,6 +431,15 @@ public class TestModel1PackageImpl extends EPackageImpl implements TestModel1Pac
initEReference(getTreeNode_References(), this.getTreeNode(), null, "references", null, 0, -1,
TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTreeNode_Reference(), this.getTreeNode(), null, "reference", null, 0, 1,
+ TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
+ IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTreeNode_SourceRef(), this.getTreeNode(), this.getTreeNode_TargetRef(),
+ "sourceRef", null, 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
+ !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTreeNode_TargetRef(), this.getTreeNode(), this.getTreeNode_SourceRef(),
+ "targetRef", null, 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE,
+ !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getTreeNode_BooleanFeature(), ecorePackage.getEBoolean(), "booleanFeature",
null, 0, 1, TreeNode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE,
!IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java
index 8cef87e..4f38fe2 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/testmodel1/impl/TreeNodeImpl.java
@@ -38,6 +38,9 @@ import java.util.Collection;
* <li>{@link testmodel1.impl.TreeNodeImpl#getParent2 <em>Parent2</em>}</li>
* <li>{@link testmodel1.impl.TreeNodeImpl#getChildren2 <em>Children2</em>}</li>
* <li>{@link testmodel1.impl.TreeNodeImpl#getReferences <em>References</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getReference <em>Reference</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getSourceRef <em>Source Ref</em>}</li>
+ * <li>{@link testmodel1.impl.TreeNodeImpl#getTargetRef <em>Target Ref</em>}</li>
* <li>{@link testmodel1.impl.TreeNodeImpl#isBooleanFeature <em>Boolean Feature</em>}</li>
* <li>{@link testmodel1.impl.TreeNodeImpl#getIntFeature <em>Int Feature</em>}</li>
* <li>{@link testmodel1.impl.TreeNodeImpl#getStringFeature <em>String Feature</em>}</li>
@@ -79,6 +82,36 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
protected EList references = null;
/**
+ * The cached value of the '{@link #getReference() <em>Reference</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getReference()
+ * @generated
+ * @ordered
+ */
+ protected TreeNode reference = null;
+
+ /**
+ * The cached value of the '{@link #getSourceRef() <em>Source Ref</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSourceRef()
+ * @generated
+ * @ordered
+ */
+ protected TreeNode sourceRef = null;
+
+ /**
+ * The cached value of the '{@link #getTargetRef() <em>Target Ref</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetRef()
+ * @generated
+ * @ordered
+ */
+ protected TreeNode targetRef = null;
+
+ /**
* The default value of the '{@link #isBooleanFeature() <em>Boolean Feature</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -313,6 +346,214 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
* <!-- end-user-doc -->
* @generated
*/
+ public TreeNode getReference()
+ {
+
+ if (reference != null && reference.eIsProxy())
+ {
+ InternalEObject oldReference = (InternalEObject) reference;
+ reference = (TreeNode) eResolveProxy(oldReference);
+ if (reference != oldReference)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ TestModel1Package.TREE_NODE__REFERENCE, oldReference, reference));
+ }
+ }
+ return reference;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeNode basicGetReference()
+ {
+ cdoLoad();
+ return reference;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setReference(TreeNode newReference)
+ {
+ cdoLoad();
+ TreeNode oldReference = reference;
+ reference = newReference;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, TestModel1Package.TREE_NODE__REFERENCE,
+ oldReference, reference));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeNode getSourceRef()
+ {
+
+ if (sourceRef != null && sourceRef.eIsProxy())
+ {
+ InternalEObject oldSourceRef = (InternalEObject) sourceRef;
+ sourceRef = (TreeNode) eResolveProxy(oldSourceRef);
+ if (sourceRef != oldSourceRef)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ TestModel1Package.TREE_NODE__SOURCE_REF, oldSourceRef, sourceRef));
+ }
+ }
+ return sourceRef;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeNode basicGetSourceRef()
+ {
+ cdoLoad();
+ return sourceRef;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSourceRef(TreeNode newSourceRef, NotificationChain msgs)
+ {
+ cdoLoad();
+ TreeNode oldSourceRef = sourceRef;
+ sourceRef = newSourceRef;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ TestModel1Package.TREE_NODE__SOURCE_REF, oldSourceRef, newSourceRef);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSourceRef(TreeNode newSourceRef)
+ {
+
+ if (newSourceRef != sourceRef)
+ {
+ NotificationChain msgs = null;
+ if (sourceRef != null)
+ msgs = ((InternalEObject) sourceRef).eInverseRemove(this,
+ TestModel1Package.TREE_NODE__TARGET_REF, TreeNode.class, msgs);
+ if (newSourceRef != null)
+ msgs = ((InternalEObject) newSourceRef).eInverseAdd(this,
+ TestModel1Package.TREE_NODE__TARGET_REF, TreeNode.class, msgs);
+ msgs = basicSetSourceRef(newSourceRef, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ TestModel1Package.TREE_NODE__SOURCE_REF, newSourceRef, newSourceRef));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeNode getTargetRef()
+ {
+
+ if (targetRef != null && targetRef.eIsProxy())
+ {
+ InternalEObject oldTargetRef = (InternalEObject) targetRef;
+ targetRef = (TreeNode) eResolveProxy(oldTargetRef);
+ if (targetRef != oldTargetRef)
+ {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE,
+ TestModel1Package.TREE_NODE__TARGET_REF, oldTargetRef, targetRef));
+ }
+ }
+ return targetRef;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TreeNode basicGetTargetRef()
+ {
+ cdoLoad();
+ return targetRef;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetTargetRef(TreeNode newTargetRef, NotificationChain msgs)
+ {
+ cdoLoad();
+ TreeNode oldTargetRef = targetRef;
+ targetRef = newTargetRef;
+ if (eNotificationRequired())
+ {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
+ TestModel1Package.TREE_NODE__TARGET_REF, oldTargetRef, newTargetRef);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTargetRef(TreeNode newTargetRef)
+ {
+
+ if (newTargetRef != targetRef)
+ {
+ NotificationChain msgs = null;
+ if (targetRef != null)
+ msgs = ((InternalEObject) targetRef).eInverseRemove(this,
+ TestModel1Package.TREE_NODE__SOURCE_REF, TreeNode.class, msgs);
+ if (newTargetRef != null)
+ msgs = ((InternalEObject) newTargetRef).eInverseAdd(this,
+ TestModel1Package.TREE_NODE__SOURCE_REF, TreeNode.class, msgs);
+ msgs = basicSetTargetRef(newTargetRef, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ TestModel1Package.TREE_NODE__TARGET_REF, newTargetRef, newTargetRef));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public boolean isBooleanFeature()
{
cdoLoad();
@@ -406,6 +647,16 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
return basicSetParent2((TreeNode) otherEnd, msgs);
case TestModel1Package.TREE_NODE__CHILDREN2:
return ((InternalEList) getChildren2()).basicAdd(otherEnd, msgs);
+ case TestModel1Package.TREE_NODE__SOURCE_REF:
+ if (sourceRef != null)
+ msgs = ((InternalEObject) sourceRef).eInverseRemove(this,
+ TestModel1Package.TREE_NODE__TARGET_REF, TreeNode.class, msgs);
+ return basicSetSourceRef((TreeNode) otherEnd, msgs);
+ case TestModel1Package.TREE_NODE__TARGET_REF:
+ if (targetRef != null)
+ msgs = ((InternalEObject) targetRef).eInverseRemove(this,
+ TestModel1Package.TREE_NODE__SOURCE_REF, TreeNode.class, msgs);
+ return basicSetTargetRef((TreeNode) otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -428,6 +679,10 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
return basicSetParent2(null, msgs);
case TestModel1Package.TREE_NODE__CHILDREN2:
return ((InternalEList) getChildren2()).basicRemove(otherEnd, msgs);
+ case TestModel1Package.TREE_NODE__SOURCE_REF:
+ return basicSetSourceRef(null, msgs);
+ case TestModel1Package.TREE_NODE__TARGET_REF:
+ return basicSetTargetRef(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -470,6 +725,15 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
return getChildren2();
case TestModel1Package.TREE_NODE__REFERENCES:
return getReferences();
+ case TestModel1Package.TREE_NODE__REFERENCE:
+ if (resolve) return getReference();
+ return basicGetReference();
+ case TestModel1Package.TREE_NODE__SOURCE_REF:
+ if (resolve) return getSourceRef();
+ return basicGetSourceRef();
+ case TestModel1Package.TREE_NODE__TARGET_REF:
+ if (resolve) return getTargetRef();
+ return basicGetTargetRef();
case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
return isBooleanFeature() ? Boolean.TRUE : Boolean.FALSE;
case TestModel1Package.TREE_NODE__INT_FEATURE:
@@ -507,6 +771,15 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
getReferences().clear();
getReferences().addAll((Collection) newValue);
return;
+ case TestModel1Package.TREE_NODE__REFERENCE:
+ setReference((TreeNode) newValue);
+ return;
+ case TestModel1Package.TREE_NODE__SOURCE_REF:
+ setSourceRef((TreeNode) newValue);
+ return;
+ case TestModel1Package.TREE_NODE__TARGET_REF:
+ setTargetRef((TreeNode) newValue);
+ return;
case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
setBooleanFeature(((Boolean) newValue).booleanValue());
return;
@@ -544,6 +817,15 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
case TestModel1Package.TREE_NODE__REFERENCES:
getReferences().clear();
return;
+ case TestModel1Package.TREE_NODE__REFERENCE:
+ setReference((TreeNode) null);
+ return;
+ case TestModel1Package.TREE_NODE__SOURCE_REF:
+ setSourceRef((TreeNode) null);
+ return;
+ case TestModel1Package.TREE_NODE__TARGET_REF:
+ setTargetRef((TreeNode) null);
+ return;
case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
setBooleanFeature(BOOLEAN_FEATURE_EDEFAULT);
return;
@@ -576,6 +858,12 @@ public class TreeNodeImpl extends CDOPersistentImpl implements TreeNode
return children2 != null && !children2.isEmpty();
case TestModel1Package.TREE_NODE__REFERENCES:
return references != null && !references.isEmpty();
+ case TestModel1Package.TREE_NODE__REFERENCE:
+ return reference != null;
+ case TestModel1Package.TREE_NODE__SOURCE_REF:
+ return sourceRef != null;
+ case TestModel1Package.TREE_NODE__TARGET_REF:
+ return targetRef != null;
case TestModel1Package.TREE_NODE__BOOLEAN_FEATURE:
return booleanFeature != BOOLEAN_FEATURE_EDEFAULT;
case TestModel1Package.TREE_NODE__INT_FEATURE: