Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Fluegge2010-11-27 11:36:40 -0500
committerMartin Fluegge2010-11-27 11:36:40 -0500
commit5a901ac0bd30005f4c5da7d05e1102eaf8b87839 (patch)
tree9f4bcfa6050db7f8d254994a95f264aad79a777e /plugins/org.eclipse.emf.cdo.tests.model2
parent60cd76d0a2bc6593e95a9d30c1f05c74a1f3aa71 (diff)
downloadcdo-5a901ac0bd30005f4c5da7d05e1102eaf8b87839.tar.gz
cdo-5a901ac0bd30005f4c5da7d05e1102eaf8b87839.tar.xz
cdo-5a901ac0bd30005f4c5da7d05e1102eaf8b87839.zip
[329752] ClassCast Exception in CDOLegacyWrapper.clearList()
https://bugs.eclipse.org/bugs/show_bug.cgi?id=329752
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model2')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/model/model2.ecore4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Factory.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Package.java67
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/EnumListHolderImpl.java169
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2FactoryImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2PackageImpl.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java24
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/EnumListHolder.java52
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/MapHolder.java20
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java66
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/EnumListHolderImpl.java79
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java24
17 files changed, 669 insertions, 19 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.ecore b/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.ecore
index 105efb6eb9..94bb6709f3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/model/model2.ecore
@@ -182,4 +182,8 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"
containment="true"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EnumListHolder">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="enumList" upperBound="-1"
+ eType="ecore:EEnum ../../org.eclipse.emf.cdo.tests.model1/model/model1.ecore#//VAT"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Factory.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Factory.java
index 1d23aeb9c3..0b00c4d3f4 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Factory.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.tests.legacy.model2;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.NotUnsettable;
import org.eclipse.emf.cdo.tests.model2.NotUnsettableWithDefault;
@@ -118,6 +119,14 @@ public interface Model2Factory extends org.eclipse.emf.cdo.tests.model2.Model2Fa
MapHolder createMapHolder();
/**
+ * Returns a new object of class '<em>Enum List Holder</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Enum List Holder</em>'.
+ * @generated
+ */
+ EnumListHolder createEnumListHolder();
+
+ /**
* Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the package supported by this factory.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Package.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Package.java
index c8ba219759..86c3038ff4 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/Model2Package.java
@@ -1145,6 +1145,33 @@ public interface Model2Package extends org.eclipse.emf.cdo.tests.model2.Model2Pa
int EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP_FEATURE_COUNT = 2;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.legacy.model2.impl.EnumListHolderImpl
+ * <em>Enum List Holder</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.model2.impl.EnumListHolderImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.model2.impl.Model2PackageImpl#getEnumListHolder()
+ * @generated
+ */
+ int ENUM_LIST_HOLDER = 19;
+
+ /**
+ * The feature id for the '<em><b>Enum List</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ENUM_LIST_HOLDER__ENUM_LIST = 0;
+
+ /**
+ * The number of structural features of the '<em>Enum List Holder</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ENUM_LIST_HOLDER_FEATURE_COUNT = 1;
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model2.SpecialPurchaseOrder
* <em>Special Purchase Order</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -2320,6 +2347,28 @@ public interface Model2Package extends org.eclipse.emf.cdo.tests.model2.Model2Pa
EReference getEObjectToEObjectValueContainedMap_Value();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder
+ * <em>Enum List Holder</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Enum List Holder</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder
+ * @generated
+ */
+ EClass getEnumListHolder();
+
+ /**
+ * Returns the meta object for the attribute list '
+ * {@link org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder#getEnumList <em>Enum List</em>}'. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Enum List</em>'.
+ * @see org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder#getEnumList()
+ * @see #getEnumListHolder()
+ * @generated
+ */
+ EAttribute getEnumListHolder_EnumList();
+
+ /**
* Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the factory that creates the instances of the model.
@@ -3215,6 +3264,24 @@ public interface Model2Package extends org.eclipse.emf.cdo.tests.model2.Model2Pa
*/
EReference EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP__VALUE = eINSTANCE.getEObjectToEObjectValueContainedMap_Value();
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.legacy.model2.impl.EnumListHolderImpl
+ * <em>Enum List Holder</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.legacy.model2.impl.EnumListHolderImpl
+ * @see org.eclipse.emf.cdo.tests.legacy.model2.impl.Model2PackageImpl#getEnumListHolder()
+ * @generated
+ */
+ EClass ENUM_LIST_HOLDER = eINSTANCE.getEnumListHolder();
+
+ /**
+ * The meta object literal for the '<em><b>Enum List</b></em>' attribute list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ENUM_LIST_HOLDER__ENUM_LIST = eINSTANCE.getEnumListHolder_EnumList();
+
}
} // Model2Package
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/EnumListHolderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/EnumListHolderImpl.java
new file mode 100644
index 0000000000..748988470a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/EnumListHolderImpl.java
@@ -0,0 +1,169 @@
+/**
+ * Copyright (c) 2004 - 2010 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.legacy.model2.impl;
+
+import org.eclipse.emf.cdo.tests.legacy.model2.Model2Package;
+import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+import java.util.Collection;
+
+/**
+ * <!-- begin-user-doc --> An implementation of the model object '<em><b>Enum List Holder</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.legacy.model2.impl.EnumListHolderImpl#getEnumList <em>Enum List</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EnumListHolderImpl extends EObjectImpl implements EnumListHolder
+{
+ /**
+ * The cached value of the '{@link #getEnumList() <em>Enum List</em>}' attribute list. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @see #getEnumList()
+ * @generated
+ * @ordered
+ */
+ protected EList<VAT> enumList;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EnumListHolderImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model2Package.Literals.ENUM_LIST_HOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EList<VAT> getEnumList()
+ {
+ if (enumList == null)
+ {
+ enumList = new EDataTypeUniqueEList<VAT>(VAT.class, this, Model2Package.ENUM_LIST_HOLDER__ENUM_LIST);
+ }
+ return enumList;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case Model2Package.ENUM_LIST_HOLDER__ENUM_LIST:
+ return getEnumList();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case Model2Package.ENUM_LIST_HOLDER__ENUM_LIST:
+ getEnumList().clear();
+ getEnumList().addAll((Collection<? extends VAT>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model2Package.ENUM_LIST_HOLDER__ENUM_LIST:
+ getEnumList().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model2Package.ENUM_LIST_HOLDER__ENUM_LIST:
+ return enumList != null && !enumList.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString()
+ {
+ if (eIsProxy())
+ return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (enumList: ");
+ result.append(enumList);
+ result.append(')');
+ return result.toString();
+ }
+
+} // EnumListHolderImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2FactoryImpl.java
index 94fdc1aaa8..5bc06844dc 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2FactoryImpl.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.tests.legacy.model2.Model2Factory;
import org.eclipse.emf.cdo.tests.legacy.model2.Model2Package;
import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.NotUnsettable;
import org.eclipse.emf.cdo.tests.model2.NotUnsettableWithDefault;
@@ -121,6 +122,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory
return (EObject)createEObjectToEObjectBothContainedMap();
case Model2Package.EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP:
return (EObject)createEObjectToEObjectValueContainedMap();
+ case Model2Package.ENUM_LIST_HOLDER:
+ return createEnumListHolder();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -340,6 +343,17 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory
*
* @generated
*/
+ public EnumListHolder createEnumListHolder()
+ {
+ EnumListHolderImpl enumListHolder = new EnumListHolderImpl();
+ return enumListHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public Model2Package getModel2Package()
{
return (Model2Package)getEPackage();
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2PackageImpl.java
index f6082b77bf..ed8700e8a3 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/Model2PackageImpl.java
@@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.legacy.model2.impl;
import org.eclipse.emf.cdo.tests.legacy.model1.Model1Package;
import org.eclipse.emf.cdo.tests.legacy.model2.Model2Factory;
import org.eclipse.emf.cdo.tests.legacy.model2.Model2Package;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.NotUnsettable;
import org.eclipse.emf.cdo.tests.model2.NotUnsettableWithDefault;
@@ -173,6 +174,13 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
private EClass eObjectToEObjectValueContainedMapEClass = null;
/**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass enumListHolderEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
* EPackage.Registry} by the package package URI value.
* <p>
@@ -216,8 +224,7 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
// Obtain or create and register package
Model2PackageImpl theModel2Package = (Model2PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model2PackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new Model2PackageImpl());
+ .get(eNS_URI) : new Model2PackageImpl());
isInited = true;
@@ -1263,6 +1270,26 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
*
* @generated
*/
+ public EClass getEnumListHolder()
+ {
+ return enumListHolderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getEnumListHolder_EnumList()
+ {
+ return (EAttribute)enumListHolderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public Model2Factory getModel2Factory()
{
return (Model2Factory)getEFactoryInstance();
@@ -1408,6 +1435,9 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
eObjectToEObjectValueContainedMapEClass = createEClass(EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP);
createEReference(eObjectToEObjectValueContainedMapEClass, EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP__KEY);
createEReference(eObjectToEObjectValueContainedMapEClass, EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP__VALUE);
+
+ enumListHolderEClass = createEClass(ENUM_LIST_HOLDER);
+ createEAttribute(enumListHolderEClass, ENUM_LIST_HOLDER__ENUM_LIST);
}
/**
@@ -1546,8 +1576,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
initEAttribute(getPersistentContainment_AttrBefore(), ecorePackage.getEString(), "attrBefore", null, 0, 1,
PersistentContainment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
- initEReference(getPersistentContainment_Children(), this.getTransientContainer(), this
- .getTransientContainer_Parent(), "children", null, 0, -1, PersistentContainment.class, !IS_TRANSIENT,
+ initEReference(getPersistentContainment_Children(), this.getTransientContainer(),
+ this.getTransientContainer_Parent(), "children", null, 0, -1, PersistentContainment.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
!IS_ORDERED);
initEAttribute(getPersistentContainment_AttrAfter(), ecorePackage.getEString(), "attrAfter", null, 0, 1,
@@ -1559,8 +1589,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
initEAttribute(getTransientContainer_AttrBefore(), ecorePackage.getEString(), "attrBefore", null, 0, 1,
TransientContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
- initEReference(getTransientContainer_Parent(), this.getPersistentContainment(), this
- .getPersistentContainment_Children(), "parent", null, 0, 1, TransientContainer.class, IS_TRANSIENT,
+ initEReference(getTransientContainer_Parent(), this.getPersistentContainment(),
+ this.getPersistentContainment_Children(), "parent", null, 0, 1, TransientContainer.class, IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
initEAttribute(getTransientContainer_AttrAfter(), ecorePackage.getEString(), "attrAfter", null, 0, 1,
@@ -1742,6 +1772,12 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(enumListHolderEClass, EnumListHolder.class, "EnumListHolder", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEnumListHolder_EnumList(), theModel1Package.getVAT(), "enumList", null, 0, -1,
+ EnumListHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java
index 4af548a837..440fca3188 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2AdapterFactory.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.NotUnsettable;
import org.eclipse.emf.cdo.tests.model2.NotUnsettableWithDefault;
@@ -206,6 +207,12 @@ public class Model2AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseEnumListHolder(EnumListHolder object)
+ {
+ return createEnumListHolderAdapter();
+ }
+
+ @Override
public Adapter caseOrder(Order object)
{
return createOrderAdapter();
@@ -514,6 +521,20 @@ public class Model2AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder
+ * <em>Enum List Holder</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.legacy.model2.EnumListHolder
+ * @generated
+ */
+ public Adapter createEnumListHolderAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model1.Order <em>Order</em>}
* '. <!-- begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful
* to ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java
index 55ebaa148f..9af9a390c7 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/util/Model2Switch.java
@@ -15,6 +15,7 @@ import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.NotUnsettable;
import org.eclipse.emf.cdo.tests.model2.NotUnsettableWithDefault;
@@ -271,6 +272,14 @@ public class Model2Switch<T>
result = defaultCase(theEObject);
return result;
}
+ case Model2Package.ENUM_LIST_HOLDER:
+ {
+ EnumListHolder enumListHolder = (EnumListHolder)theEObject;
+ T result = caseEnumListHolder(enumListHolder);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -574,6 +583,21 @@ public class Model2Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Enum List Holder</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>Enum List Holder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEnumListHolder(EnumListHolder object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Order</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.model2/src/org/eclipse/emf/cdo/tests/model2/EnumListHolder.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/EnumListHolder.java
new file mode 100644
index 0000000000..dca7db4a40
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/EnumListHolder.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2004 - 2010 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.model2;
+
+import org.eclipse.emf.cdo.tests.model1.VAT;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc --> A representation of the model object '<em><b>Enum List Holder</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model2.EnumListHolder#getEnumList <em>Enum List</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getEnumListHolder()
+ * @model
+ * @generated
+ */
+public interface EnumListHolder extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Enum List</b></em>' attribute list. The list contents are of type
+ * {@link org.eclipse.emf.cdo.tests.model1.VAT}. The literals are from the enumeration
+ * {@link org.eclipse.emf.cdo.tests.model1.VAT}. <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Enum List</em>' attribute list isn't clear, there really should be more of a description
+ * here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Enum List</em>' attribute list.
+ * @see org.eclipse.emf.cdo.tests.model1.VAT
+ * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getEnumListHolder_EnumList()
+ * @model
+ * @generated
+ */
+ EList<VAT> getEnumList();
+
+} // EnumListHolder
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/MapHolder.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/MapHolder.java
index de2e90890b..51d30d9748 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/MapHolder.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/MapHolder.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
*
- * $Id: MapHolder.java,v 1.1 2010-03-11 20:34:56 mfluegge Exp $
+ * $Id: MapHolder.java,v 1.2 2010-11-27 16:36:39 mfluegge Exp $
*/
package org.eclipse.emf.cdo.tests.model2;
@@ -57,7 +57,8 @@ public interface MapHolder extends EObject
*
* @return the value of the '<em>Integer To String Map</em>' map.
* @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_IntegerToStringMap()
- * @model mapType="org.eclipse.emf.cdo.tests.model2.IntegerToStringMap<org.eclipse.emf.ecore.EIntegerObject, org.eclipse.emf.ecore.EString>"
+ * @model mapType=
+ * "org.eclipse.emf.cdo.tests.model2.IntegerToStringMap<org.eclipse.emf.ecore.EIntegerObject, org.eclipse.emf.ecore.EString>"
* @generated
*/
EMap<Integer, String> getIntegerToStringMap();
@@ -108,7 +109,8 @@ public interface MapHolder extends EObject
*
* @return the value of the '<em>String To Address Containment Map</em>' map.
* @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_StringToAddressContainmentMap()
- * @model mapType="org.eclipse.emf.cdo.tests.model2.StringToAddressContainmentMap<org.eclipse.emf.ecore.EString, org.eclipse.emf.cdo.tests.model1.Address>"
+ * @model mapType=
+ * "org.eclipse.emf.cdo.tests.model2.StringToAddressContainmentMap<org.eclipse.emf.ecore.EString, org.eclipse.emf.cdo.tests.model1.Address>"
* @generated
*/
EMap<String, Address> getStringToAddressContainmentMap();
@@ -125,7 +127,8 @@ public interface MapHolder extends EObject
*
* @return the value of the '<em>String To Address Reference Map</em>' map.
* @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_StringToAddressReferenceMap()
- * @model mapType="org.eclipse.emf.cdo.tests.model2.StringToAddressReferenceMap<org.eclipse.emf.ecore.EString, org.eclipse.emf.cdo.tests.model1.Address>"
+ * @model mapType=
+ * "org.eclipse.emf.cdo.tests.model2.StringToAddressReferenceMap<org.eclipse.emf.ecore.EString, org.eclipse.emf.cdo.tests.model1.Address>"
* @generated
*/
EMap<String, Address> getStringToAddressReferenceMap();
@@ -160,7 +163,8 @@ public interface MapHolder extends EObject
*
* @return the value of the '<em>EObject To EObject Key Contained Map</em>' map.
* @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_EObjectToEObjectKeyContainedMap()
- * @model mapType="org.eclipse.emf.cdo.tests.model2.EObjectToEObjectKeyContainedMap<org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject>"
+ * @model mapType=
+ * "org.eclipse.emf.cdo.tests.model2.EObjectToEObjectKeyContainedMap<org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject>"
* @generated
*/
EMap<EObject, EObject> getEObjectToEObjectKeyContainedMap();
@@ -177,7 +181,8 @@ public interface MapHolder extends EObject
*
* @return the value of the '<em>EObject To EObject Both Contained Map</em>' map.
* @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_EObjectToEObjectBothContainedMap()
- * @model mapType="org.eclipse.emf.cdo.tests.model2.EObjectToEObjectBothContainedMap<org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject>"
+ * @model mapType=
+ * "org.eclipse.emf.cdo.tests.model2.EObjectToEObjectBothContainedMap<org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject>"
* @generated
*/
EMap<EObject, EObject> getEObjectToEObjectBothContainedMap();
@@ -194,7 +199,8 @@ public interface MapHolder extends EObject
*
* @return the value of the '<em>EObject To EObject Value Contained Map</em>' map.
* @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_EObjectToEObjectValueContainedMap()
- * @model mapType="org.eclipse.emf.cdo.tests.model2.EObjectToEObjectValueContainedMap<org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject>"
+ * @model mapType=
+ * "org.eclipse.emf.cdo.tests.model2.EObjectToEObjectValueContainedMap<org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject>"
* @generated
*/
EMap<EObject, EObject> getEObjectToEObjectValueContainedMap();
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java
index e126243379..6149738b16 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Factory.java
@@ -109,6 +109,14 @@ public interface Model2Factory extends EFactory
MapHolder createMapHolder();
/**
+ * Returns a new object of class '<em>Enum List Holder</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Enum List Holder</em>'.
+ * @generated
+ */
+ EnumListHolder createEnumListHolder();
+
+ /**
* Returns the package supported by this factory. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the package supported by this factory.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java
index 4ef8f14354..7c03e130f8 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/Model2Package.java
@@ -1143,6 +1143,33 @@ public interface Model2Package extends EPackage
int EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP_FEATURE_COUNT = 2;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model2.impl.EnumListHolderImpl
+ * <em>Enum List Holder</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model2.impl.EnumListHolderImpl
+ * @see org.eclipse.emf.cdo.tests.model2.impl.Model2PackageImpl#getEnumListHolder()
+ * @generated
+ */
+ int ENUM_LIST_HOLDER = 19;
+
+ /**
+ * The feature id for the '<em><b>Enum List</b></em>' attribute list. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ENUM_LIST_HOLDER__ENUM_LIST = 0;
+
+ /**
+ * The number of structural features of the '<em>Enum List Holder</em>' class. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ENUM_LIST_HOLDER_FEATURE_COUNT = 1;
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder
* <em>Special Purchase Order</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -2303,6 +2330,27 @@ public interface Model2Package extends EPackage
EReference getEObjectToEObjectValueContainedMap_Value();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model2.EnumListHolder
+ * <em>Enum List Holder</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Enum List Holder</em>'.
+ * @see org.eclipse.emf.cdo.tests.model2.EnumListHolder
+ * @generated
+ */
+ EClass getEnumListHolder();
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.emf.cdo.tests.model2.EnumListHolder#getEnumList
+ * <em>Enum List</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute list '<em>Enum List</em>'.
+ * @see org.eclipse.emf.cdo.tests.model2.EnumListHolder#getEnumList()
+ * @see #getEnumListHolder()
+ * @generated
+ */
+ EAttribute getEnumListHolder_EnumList();
+
+ /**
* Returns the factory that creates the instances of the model. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the factory that creates the instances of the model.
@@ -3195,6 +3243,24 @@ public interface Model2Package extends EPackage
*/
EReference EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP__VALUE = eINSTANCE.getEObjectToEObjectValueContainedMap_Value();
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model2.impl.EnumListHolderImpl
+ * <em>Enum List Holder</em>}' class. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.cdo.tests.model2.impl.EnumListHolderImpl
+ * @see org.eclipse.emf.cdo.tests.model2.impl.Model2PackageImpl#getEnumListHolder()
+ * @generated
+ */
+ EClass ENUM_LIST_HOLDER = eINSTANCE.getEnumListHolder();
+
+ /**
+ * The meta object literal for the '<em><b>Enum List</b></em>' attribute list feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute ENUM_LIST_HOLDER__ENUM_LIST = eINSTANCE.getEnumListHolder_EnumList();
+
}
} // Model2Package
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/EnumListHolderImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/EnumListHolderImpl.java
new file mode 100644
index 0000000000..23faf2903b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/EnumListHolderImpl.java
@@ -0,0 +1,79 @@
+/**
+ * Copyright (c) 2004 - 2010 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.model2.impl;
+
+import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
+import org.eclipse.emf.cdo.tests.model2.Model2Package;
+
+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>Enum List Holder</b></em>'. <!-- end-user-doc
+ * -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model2.impl.EnumListHolderImpl#getEnumList <em>Enum List</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EnumListHolderImpl extends CDOObjectImpl implements EnumListHolder
+{
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected EnumListHolderImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model2Package.Literals.ENUM_LIST_HOLDER;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ public EList<VAT> getEnumList()
+ {
+ return (EList<VAT>)eGet(Model2Package.Literals.ENUM_LIST_HOLDER__ENUM_LIST, true);
+ }
+
+} // EnumListHolderImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java
index 61121faf26..661bd01c7c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2FactoryImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.tests.model2.impl;
import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.Model2Factory;
import org.eclipse.emf.cdo.tests.model2.Model2Package;
@@ -121,6 +122,8 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory
return (EObject)createEObjectToEObjectBothContainedMap();
case Model2Package.EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP:
return (EObject)createEObjectToEObjectValueContainedMap();
+ case Model2Package.ENUM_LIST_HOLDER:
+ return createEnumListHolder();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -340,6 +343,17 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory
*
* @generated
*/
+ public EnumListHolder createEnumListHolder()
+ {
+ EnumListHolderImpl enumListHolder = new EnumListHolderImpl();
+ return enumListHolder;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public Model2Package getModel2Package()
{
return (Model2Package)getEPackage();
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java
index 63c99ca193..18e1b07d6c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/Model2PackageImpl.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.tests.model2.impl;
import org.eclipse.emf.cdo.tests.model1.Model1Package;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.Model2Factory;
import org.eclipse.emf.cdo.tests.model2.Model2Package;
@@ -173,6 +174,13 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
private EClass eObjectToEObjectValueContainedMapEClass = null;
/**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass enumListHolderEClass = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
* EPackage.Registry} by the package package URI value.
* <p>
@@ -216,8 +224,7 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
// Obtain or create and register package
Model2PackageImpl theModel2Package = (Model2PackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Model2PackageImpl ? EPackage.Registry.INSTANCE
- .get(eNS_URI)
- : new Model2PackageImpl());
+ .get(eNS_URI) : new Model2PackageImpl());
isInited = true;
@@ -1263,6 +1270,26 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
*
* @generated
*/
+ public EClass getEnumListHolder()
+ {
+ return enumListHolderEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EAttribute getEnumListHolder_EnumList()
+ {
+ return (EAttribute)enumListHolderEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public Model2Factory getModel2Factory()
{
return (Model2Factory)getEFactoryInstance();
@@ -1408,6 +1435,9 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
eObjectToEObjectValueContainedMapEClass = createEClass(EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP);
createEReference(eObjectToEObjectValueContainedMapEClass, EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP__KEY);
createEReference(eObjectToEObjectValueContainedMapEClass, EOBJECT_TO_EOBJECT_VALUE_CONTAINED_MAP__VALUE);
+
+ enumListHolderEClass = createEClass(ENUM_LIST_HOLDER);
+ createEAttribute(enumListHolderEClass, ENUM_LIST_HOLDER__ENUM_LIST);
}
/**
@@ -1546,8 +1576,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
initEAttribute(getPersistentContainment_AttrBefore(), ecorePackage.getEString(), "attrBefore", null, 0, 1,
PersistentContainment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
- initEReference(getPersistentContainment_Children(), this.getTransientContainer(), this
- .getTransientContainer_Parent(), "children", null, 0, -1, PersistentContainment.class, !IS_TRANSIENT,
+ initEReference(getPersistentContainment_Children(), this.getTransientContainer(),
+ this.getTransientContainer_Parent(), "children", null, 0, -1, PersistentContainment.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
!IS_ORDERED);
initEAttribute(getPersistentContainment_AttrAfter(), ecorePackage.getEString(), "attrAfter", null, 0, 1,
@@ -1559,8 +1589,8 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
initEAttribute(getTransientContainer_AttrBefore(), ecorePackage.getEString(), "attrBefore", null, 0, 1,
TransientContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
- initEReference(getTransientContainer_Parent(), this.getPersistentContainment(), this
- .getPersistentContainment_Children(), "parent", null, 0, 1, TransientContainer.class, IS_TRANSIENT,
+ initEReference(getTransientContainer_Parent(), this.getPersistentContainment(),
+ this.getPersistentContainment_Children(), "parent", null, 0, 1, TransientContainer.class, IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
IS_ORDERED);
initEAttribute(getTransientContainer_AttrAfter(), ecorePackage.getEString(), "attrAfter", null, 0, 1,
@@ -1742,6 +1772,12 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package
Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(enumListHolderEClass, EnumListHolder.class, "EnumListHolder", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEnumListHolder_EnumList(), theModel1Package.getVAT(), "enumList", null, 0, -1,
+ EnumListHolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+
// Create resource
createResource(eNS_URI);
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java
index 9c6124bd92..c884000567 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2AdapterFactory.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.Model2Package;
import org.eclipse.emf.cdo.tests.model2.NotUnsettable;
@@ -206,6 +207,12 @@ public class Model2AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseEnumListHolder(EnumListHolder object)
+ {
+ return createEnumListHolderAdapter();
+ }
+
+ @Override
public Adapter caseOrder(Order object)
{
return createOrderAdapter();
@@ -514,6 +521,20 @@ public class Model2AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model2.EnumListHolder
+ * <em>Enum List Holder</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.model2.EnumListHolder
+ * @generated
+ */
+ public Adapter createEnumListHolderAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model1.Order <em>Order</em>}'. <!--
* begin-user-doc --> This default implementation returns null so that we can easily ignore cases; it's useful to
* ignore a case when inheritance will catch all the cases anyway. <!-- end-user-doc -->
diff --git a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java
index efe1f97913..294302f927 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/util/Model2Switch.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.tests.model1.Address;
import org.eclipse.emf.cdo.tests.model1.Order;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.VAT;
+import org.eclipse.emf.cdo.tests.model2.EnumListHolder;
import org.eclipse.emf.cdo.tests.model2.MapHolder;
import org.eclipse.emf.cdo.tests.model2.Model2Package;
import org.eclipse.emf.cdo.tests.model2.NotUnsettable;
@@ -271,6 +272,14 @@ public class Model2Switch<T>
result = defaultCase(theEObject);
return result;
}
+ case Model2Package.ENUM_LIST_HOLDER:
+ {
+ EnumListHolder enumListHolder = (EnumListHolder)theEObject;
+ T result = caseEnumListHolder(enumListHolder);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -574,6 +583,21 @@ public class Model2Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Enum List Holder</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>Enum List Holder</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEnumListHolder(EnumListHolder object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Order</em>'. <!-- begin-user-doc --> This
* implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
*

Back to the top