Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2010-08-08 03:17:19 -0400
committerEike Stepper2010-08-08 03:17:19 -0400
commit0a9bb9a009e242bdb0bb70017dedd1eb0455d0a8 (patch)
tree075bc0257d63082fa97c53350c69f339a23ea1ce /plugins/org.eclipse.emf.cdo.tests.model3
parent8b2f4224bb51b6ef162251a24da646e9243d25a6 (diff)
downloadcdo-0a9bb9a009e242bdb0bb70017dedd1eb0455d0a8.tar.gz
cdo-0a9bb9a009e242bdb0bb70017dedd1eb0455d0a8.tar.xz
cdo-0a9bb9a009e242bdb0bb70017dedd1eb0455d0a8.zip
[320690] Stale references can occur if one of two commits deletes a reference target
https://bugs.eclipse.org/bugs/show_bug.cgi?id=320690
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model3')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java38
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java37
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java23
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java8
17 files changed, 136 insertions, 72 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore
index 0c28dc808a..c75b28da81 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/model/model3.ecore
@@ -23,6 +23,8 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//NodeA" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="otherNodes" upperBound="-1"
+ eType="#//NodeA"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NodeB">
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java
index 60637a1e00..6837d39b32 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Class1Impl.java
@@ -92,9 +92,7 @@ public class Class1Impl extends EObjectImpl implements Class1
public void unsetClass2()
{
if (class2 != null)
- {
((InternalEList.Unsettable<?>)class2).unset();
- }
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java
index f5ead76799..34596e57e4 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/MetaRefImpl.java
@@ -78,10 +78,8 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef
if (ePackageRef != oldEPackageRef)
{
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Model3Package.META_REF__EPACKAGE_REF,
oldEPackageRef, ePackageRef));
- }
}
}
return ePackageRef;
@@ -107,10 +105,8 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef
EPackage oldEPackageRef = ePackageRef;
ePackageRef = newEPackageRef;
if (eNotificationRequired())
- {
eNotify(new ENotificationImpl(this, Notification.SET, Model3Package.META_REF__EPACKAGE_REF, oldEPackageRef,
ePackageRef));
- }
}
/**
@@ -125,9 +121,7 @@ public class MetaRefImpl extends EObjectImpl implements MetaRef
{
case Model3Package.META_REF__EPACKAGE_REF:
if (resolve)
- {
return getEPackageRef();
- }
return basicGetEPackageRef();
}
return super.eGet(featureID, resolve, coreType);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java
index 5eaa188140..f0d7c65de6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/Model3PackageImpl.java
@@ -126,14 +126,11 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
public static Model3Package init()
{
if (isInited)
- {
return (Model3Package)EPackage.Registry.INSTANCE.getEPackage(Model3Package.eNS_URI);
- }
// Obtain or create and register package
Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model3PackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new Model3PackageImpl());
+ .get(eNS_URI) : new Model3PackageImpl());
isInited = true;
@@ -276,6 +273,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ public EReference getNodeA_OtherNodes()
+ {
+ return (EReference)nodeAEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EClass getNodeB()
{
return nodeBEClass;
@@ -347,9 +354,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -368,6 +373,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
nodeAEClass = createEClass(NODE_A);
createEReference(nodeAEClass, NODE_A__CHILDREN);
createEAttribute(nodeAEClass, NODE_A__NAME);
+ createEReference(nodeAEClass, NODE_A__OTHER_NODES);
nodeBEClass = createEClass(NODE_B);
createEReference(nodeBEClass, NODE_B__CHILDREN);
@@ -394,9 +400,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -430,26 +434,30 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(polygonEClass, Polygon.class, "Polygon", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPolygon_Points(), getPoint(), "points", null, 1, -1, Polygon.class, !IS_TRANSIENT, !IS_VOLATILE,
- IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPolygon_Points(), this.getPoint(), "points", null, 1, -1, Polygon.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(polygonWithDuplicatesEClass, PolygonWithDuplicates.class, "PolygonWithDuplicates", !IS_ABSTRACT,
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getPolygonWithDuplicates_Points(), getPoint(), "points", null, 1, -1, PolygonWithDuplicates.class,
- !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPolygonWithDuplicates_Points(), this.getPoint(), "points", null, 1, -1,
+ PolygonWithDuplicates.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
initEClass(nodeAEClass, NodeA.class, "NodeA", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getNodeA_Children(), getNodeA(), null, "children", null, 0, -1, NodeA.class, !IS_TRANSIENT,
+ initEReference(getNodeA_Children(), this.getNodeA(), null, "children", null, 0, -1, NodeA.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
initEAttribute(getNodeA_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeA.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNodeA_OtherNodes(), this.getNodeA(), null, "otherNodes", null, 0, -1, NodeA.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEClass(nodeBEClass, NodeB.class, "NodeB", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getNodeB_Children(), getNodeB(), getNodeB_Parent(), "children", null, 0, -1, NodeB.class,
+ initEReference(getNodeB_Children(), this.getNodeB(), this.getNodeB_Parent(), "children", null, 0, -1, NodeB.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
- initEReference(getNodeB_Parent(), getNodeB(), getNodeB_Children(), "parent", null, 0, 1, NodeB.class,
+ initEReference(getNodeB_Parent(), this.getNodeB(), this.getNodeB_Children(), "parent", null, 0, 1, NodeB.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
initEAttribute(getNodeB_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeB.class, !IS_TRANSIENT,
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java
index 69559b5553..06fb1c8655 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/NodeAImpl.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
import java.util.Collection;
@@ -32,6 +33,7 @@ import java.util.Collection;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model3.impl.NodeAImpl#getOtherNodes <em>Other Nodes</em>}</li>
* </ul>
* </p>
*
@@ -69,6 +71,16 @@ public class NodeAImpl extends EObjectImpl implements NodeA
protected String name = NAME_EDEFAULT;
/**
+ * The cached value of the '{@link #getOtherNodes() <em>Other Nodes</em>}' reference list. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getOtherNodes()
+ * @generated
+ * @ordered
+ */
+ protected EList<NodeA> otherNodes;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
@@ -131,6 +143,20 @@ public class NodeAImpl extends EObjectImpl implements NodeA
*
* @generated
*/
+ public EList<NodeA> getOtherNodes()
+ {
+ if (otherNodes == null)
+ {
+ otherNodes = new EObjectResolvingEList<NodeA>(NodeA.class, this, Model3Package.NODE_A__OTHER_NODES);
+ }
+ return otherNodes;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
@@ -156,6 +182,8 @@ public class NodeAImpl extends EObjectImpl implements NodeA
return getChildren();
case Model3Package.NODE_A__NAME:
return getName();
+ case Model3Package.NODE_A__OTHER_NODES:
+ return getOtherNodes();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -178,6 +206,10 @@ public class NodeAImpl extends EObjectImpl implements NodeA
case Model3Package.NODE_A__NAME:
setName((String)newValue);
return;
+ case Model3Package.NODE_A__OTHER_NODES:
+ getOtherNodes().clear();
+ getOtherNodes().addAll((Collection<? extends NodeA>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -198,6 +230,9 @@ public class NodeAImpl extends EObjectImpl implements NodeA
case Model3Package.NODE_A__NAME:
setName(NAME_EDEFAULT);
return;
+ case Model3Package.NODE_A__OTHER_NODES:
+ getOtherNodes().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -216,6 +251,8 @@ public class NodeAImpl extends EObjectImpl implements NodeA
return children != null && !children.isEmpty();
case Model3Package.NODE_A__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case Model3Package.NODE_A__OTHER_NODES:
+ return otherNodes != null && !otherNodes.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java
index daa4a6fd61..db6b4af643 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonImpl.java
@@ -156,9 +156,7 @@ public class PolygonImpl extends EObjectImpl implements Polygon
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (points: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java
index 38dfd4acb9..9d066d95e3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/impl/PolygonWithDuplicatesImpl.java
@@ -157,9 +157,7 @@ public class PolygonWithDuplicatesImpl extends EObjectImpl implements PolygonWit
public String toString()
{
if (eIsProxy())
- {
return super.toString();
- }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (points: ");
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java
index 660011cb18..1c3f85cfe8 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/impl/SubpackagePackageImpl.java
@@ -76,14 +76,11 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac
public static SubpackagePackage init()
{
if (isInited)
- {
return (SubpackagePackage)EPackage.Registry.INSTANCE.getEPackage(SubpackagePackage.eNS_URI);
- }
// Obtain or create and register package
SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SubpackagePackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new SubpackagePackageImpl());
+ .get(eNS_URI) : new SubpackagePackageImpl());
isInited = true;
@@ -157,9 +154,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -183,9 +178,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java
index 0998561008..173208ba4f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/subpackage/util/SubpackageSwitch.java
@@ -97,9 +97,7 @@ public class SubpackageSwitch<T>
Class2 class2 = (Class2)theEObject;
T result = caseClass2(class2);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
default:
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java
index d4a8d9edbe..7d9aacf449 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/legacy/model3/util/Model3Switch.java
@@ -102,9 +102,7 @@ public class Model3Switch<T>
Class1 class1 = (Class1)theEObject;
T result = caseClass1(class1);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.META_REF:
@@ -112,9 +110,7 @@ public class Model3Switch<T>
MetaRef metaRef = (MetaRef)theEObject;
T result = caseMetaRef(metaRef);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.POLYGON:
@@ -122,9 +118,7 @@ public class Model3Switch<T>
Polygon polygon = (Polygon)theEObject;
T result = casePolygon(polygon);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.POLYGON_WITH_DUPLICATES:
@@ -132,9 +126,7 @@ public class Model3Switch<T>
PolygonWithDuplicates polygonWithDuplicates = (PolygonWithDuplicates)theEObject;
T result = casePolygonWithDuplicates(polygonWithDuplicates);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.NODE_A:
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java
index cb11ab92df..6b3ba686fc 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/Model3Package.java
@@ -193,12 +193,20 @@ public interface Model3Package extends EPackage
int NODE_A__NAME = 1;
/**
+ * The feature id for the '<em><b>Other Nodes</b></em>' reference list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_A__OTHER_NODES = 2;
+
+ /**
* The number of structural features of the '<em>Node A</em>' class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
* @ordered
*/
- int NODE_A_FEATURE_COUNT = 2;
+ int NODE_A_FEATURE_COUNT = 3;
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl <em>Node B</em>}' class. <!--
@@ -371,6 +379,17 @@ public interface Model3Package extends EPackage
EAttribute getNodeA_Name();
/**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes
+ * <em>Other Nodes</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference list '<em>Other Nodes</em>'.
+ * @see org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes()
+ * @see #getNodeA()
+ * @generated
+ */
+ EReference getNodeA_OtherNodes();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model3.NodeB <em>Node B</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -546,6 +565,14 @@ public interface Model3Package extends EPackage
EAttribute NODE_A__NAME = eINSTANCE.getNodeA_Name();
/**
+ * The meta object literal for the '<em><b>Other Nodes</b></em>' reference list feature. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference NODE_A__OTHER_NODES = eINSTANCE.getNodeA_OtherNodes();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model3.impl.NodeBImpl <em>Node B</em>}' class.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java
index fa60d47253..e719db9c4b 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/NodeA.java
@@ -20,6 +20,7 @@ import org.eclipse.emf.ecore.EObject;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model3.NodeA#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model3.NodeA#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.NodeA#getOtherNodes <em>Other Nodes</em>}</li>
* </ul>
* </p>
*
@@ -71,4 +72,20 @@ public interface NodeA extends EObject
*/
void setName(String value);
+ /**
+ * Returns the value of the '<em><b>Other Nodes</b></em>' reference list. The list contents are of type
+ * {@link org.eclipse.emf.cdo.tests.model3.NodeA}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Other Nodes</em>' reference list isn't clear, there really should be more of a
+ * description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Other Nodes</em>' reference list.
+ * @see org.eclipse.emf.cdo.tests.model3.Model3Package#getNodeA_OtherNodes()
+ * @model
+ * @generated
+ */
+ EList<NodeA> getOtherNodes();
+
} // NodeA
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java
index eedcbb2d28..39842e3a4a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/Model3PackageImpl.java
@@ -126,14 +126,11 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
public static Model3Package init()
{
if (isInited)
- {
return (Model3Package)EPackage.Registry.INSTANCE.getEPackage(Model3Package.eNS_URI);
- }
// Obtain or create and register package
Model3PackageImpl theModel3Package = (Model3PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model3PackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new Model3PackageImpl());
+ .get(eNS_URI) : new Model3PackageImpl());
isInited = true;
@@ -276,6 +273,16 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
*
* @generated
*/
+ public EReference getNodeA_OtherNodes()
+ {
+ return (EReference)nodeAEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EClass getNodeB()
{
return nodeBEClass;
@@ -347,9 +354,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -368,6 +373,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
nodeAEClass = createEClass(NODE_A);
createEReference(nodeAEClass, NODE_A__CHILDREN);
createEAttribute(nodeAEClass, NODE_A__NAME);
+ createEReference(nodeAEClass, NODE_A__OTHER_NODES);
nodeBEClass = createEClass(NODE_B);
createEReference(nodeBEClass, NODE_B__CHILDREN);
@@ -394,9 +400,7 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
@@ -445,6 +449,9 @@ public class Model3PackageImpl extends EPackageImpl implements Model3Package
IS_ORDERED);
initEAttribute(getNodeA_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NodeA.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNodeA_OtherNodes(), this.getNodeA(), null, "otherNodes", null, 0, -1, NodeA.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEClass(nodeBEClass, NodeB.class, "NodeB", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getNodeB_Children(), this.getNodeB(), this.getNodeB_Parent(), "children", null, 0, -1, NodeB.class,
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java
index 6390769042..2e1dd9b65c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/impl/NodeAImpl.java
@@ -25,6 +25,7 @@ import org.eclipse.emf.ecore.EClass;
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getChildren <em>Children</em>}</li>
* <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model3.impl.NodeAImpl#getOtherNodes <em>Other Nodes</em>}</li>
* </ul>
* </p>
*
@@ -95,4 +96,15 @@ public class NodeAImpl extends CDOObjectImpl implements NodeA
eSet(Model3Package.Literals.NODE_A__NAME, newName);
}
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<NodeA> getOtherNodes()
+ {
+ return (EList<NodeA>)eGet(Model3Package.Literals.NODE_A__OTHER_NODES, true);
+ }
+
} // NodeAImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java
index 946cba6e12..aca6da147e 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/impl/SubpackagePackageImpl.java
@@ -76,14 +76,11 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac
public static SubpackagePackage init()
{
if (isInited)
- {
return (SubpackagePackage)EPackage.Registry.INSTANCE.getEPackage(SubpackagePackage.eNS_URI);
- }
// Obtain or create and register package
SubpackagePackageImpl theSubpackagePackage = (SubpackagePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof SubpackagePackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new SubpackagePackageImpl());
+ .get(eNS_URI) : new SubpackagePackageImpl());
isInited = true;
@@ -157,9 +154,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac
public void createPackageContents()
{
if (isCreated)
- {
return;
- }
isCreated = true;
// Create classes and their features
@@ -183,9 +178,7 @@ public class SubpackagePackageImpl extends EPackageImpl implements SubpackagePac
public void initializePackageContents()
{
if (isInitialized)
- {
return;
- }
isInitialized = true;
// Initialize package
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java
index 85810e7186..868ca1f276 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/subpackage/util/SubpackageSwitch.java
@@ -97,9 +97,7 @@ public class SubpackageSwitch<T>
Class2 class2 = (Class2)theEObject;
T result = caseClass2(class2);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
default:
diff --git a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java
index 5a6aab4955..90f2a73bc6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model3/src/org/eclipse/emf/cdo/tests/model3/util/Model3Switch.java
@@ -102,9 +102,7 @@ public class Model3Switch<T>
Class1 class1 = (Class1)theEObject;
T result = caseClass1(class1);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.META_REF:
@@ -112,9 +110,7 @@ public class Model3Switch<T>
MetaRef metaRef = (MetaRef)theEObject;
T result = caseMetaRef(metaRef);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.POLYGON:
@@ -122,9 +118,7 @@ public class Model3Switch<T>
Polygon polygon = (Polygon)theEObject;
T result = casePolygon(polygon);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.POLYGON_WITH_DUPLICATES:
@@ -132,9 +126,7 @@ public class Model3Switch<T>
PolygonWithDuplicates polygonWithDuplicates = (PolygonWithDuplicates)theEObject;
T result = casePolygonWithDuplicates(polygonWithDuplicates);
if (result == null)
- {
result = defaultCase(theEObject);
- }
return result;
}
case Model3Package.NODE_A:

Back to the top