From 5a901ac0bd30005f4c5da7d05e1102eaf8b87839 Mon Sep 17 00:00:00 2001 From: Martin Fluegge Date: Sat, 27 Nov 2010 16:36:40 +0000 Subject: [329752] ClassCast Exception in CDOLegacyWrapper.clearList() https://bugs.eclipse.org/bugs/show_bug.cgi?id=329752 --- .../model/model2.ecore | 4 + .../emf/cdo/tests/legacy/model2/Model2Factory.java | 9 ++ .../emf/cdo/tests/legacy/model2/Model2Package.java | 67 ++++++++ .../legacy/model2/impl/EnumListHolderImpl.java | 169 +++++++++++++++++++++ .../legacy/model2/impl/Model2FactoryImpl.java | 14 ++ .../legacy/model2/impl/Model2PackageImpl.java | 48 +++++- .../legacy/model2/util/Model2AdapterFactory.java | 21 +++ .../cdo/tests/legacy/model2/util/Model2Switch.java | 24 +++ .../emf/cdo/tests/model2/EnumListHolder.java | 52 +++++++ .../eclipse/emf/cdo/tests/model2/MapHolder.java | 20 ++- .../emf/cdo/tests/model2/Model2Factory.java | 8 + .../emf/cdo/tests/model2/Model2Package.java | 66 ++++++++ .../cdo/tests/model2/impl/EnumListHolderImpl.java | 79 ++++++++++ .../cdo/tests/model2/impl/Model2FactoryImpl.java | 14 ++ .../cdo/tests/model2/impl/Model2PackageImpl.java | 48 +++++- .../tests/model2/util/Model2AdapterFactory.java | 21 +++ .../emf/cdo/tests/model2/util/Model2Switch.java | 24 +++ 17 files changed, 669 insertions(+), 19 deletions(-) create mode 100644 plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/legacy/model2/impl/EnumListHolderImpl.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/EnumListHolder.java create mode 100644 plugins/org.eclipse.emf.cdo.tests.model2/src/org/eclipse/emf/cdo/tests/model2/impl/EnumListHolderImpl.java (limited to 'plugins/org.eclipse.emf.cdo.tests.model2') 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 @@ + + + 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; @@ -117,6 +118,14 @@ public interface Model2Factory extends org.eclipse.emf.cdo.tests.model2.Model2Fa */ MapHolder createMapHolder(); + /** + * Returns a new object of class 'Enum List Holder'. + * + * @return a new object of class 'Enum List Holder'. + * @generated + */ + EnumListHolder createEnumListHolder(); + /** * Returns 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 @@ -1144,6 +1144,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 + * Enum List Holder}' class. + * + * @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 'Enum List' attribute list. + * + * @generated + * @ordered + */ + int ENUM_LIST_HOLDER__ENUM_LIST = 0; + + /** + * The number of structural features of the 'Enum List Holder' class. + * + * @generated + * @ordered + */ + int ENUM_LIST_HOLDER_FEATURE_COUNT = 1; + /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.legacy.model2.SpecialPurchaseOrder * Special Purchase Order}'. @@ -2319,6 +2346,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 + * Enum List Holder}'. + * + * @return the meta object for class 'Enum List Holder'. + * @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 Enum List}'. + * + * @return the meta object for the attribute list 'Enum List'. + * @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. * @@ -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 + * Enum List Holder}' class. + * + * @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 'Enum List' attribute list feature. + * + * @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; + +/** + * An implementation of the model object 'Enum List Holder'. + *

+ * The following features are implemented: + *

+ *

+ * + * @generated + */ +public class EnumListHolderImpl extends EObjectImpl implements EnumListHolder +{ + /** + * The cached value of the '{@link #getEnumList() Enum List}' attribute list. + * + * @see #getEnumList() + * @generated + * @ordered + */ + protected EList enumList; + + /** + * + * + * @generated + */ + protected EnumListHolderImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model2Package.Literals.ENUM_LIST_HOLDER; + } + + /** + * + * + * @generated + */ + public EList getEnumList() + { + if (enumList == null) + { + enumList = new EDataTypeUniqueEList(VAT.class, this, Model2Package.ENUM_LIST_HOLDER__ENUM_LIST); + } + return enumList; + } + + /** + * + * + * @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); + } + + /** + * + * + * @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)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model2Package.ENUM_LIST_HOLDER__ENUM_LIST: + getEnumList().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @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); + } + + /** + * + * + * @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"); } @@ -335,6 +338,17 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory return eObjectToEObjectValueContainedMap; } + /** + * + * + * @generated + */ + public EnumListHolder createEnumListHolder() + { + EnumListHolderImpl enumListHolder = new EnumListHolderImpl(); + return enumListHolder; + } + /** * * 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; @@ -172,6 +173,13 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package */ private EClass eObjectToEObjectValueContainedMapEClass = null; + /** + * + * + * @generated + */ + private EClass enumListHolderEClass = null; + /** * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry * EPackage.Registry} by the package package URI value. @@ -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; @@ -1258,6 +1265,26 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package return (EReference)eObjectToEObjectValueContainedMapEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + public EClass getEnumListHolder() + { + return enumListHolderEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEnumListHolder_EnumList() + { + return (EAttribute)enumListHolderEClass.getEStructuralFeatures().get(0); + } + /** * * @@ -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; @@ -205,6 +206,12 @@ public class Model2AdapterFactory extends AdapterFactoryImpl return createEObjectToEObjectValueContainedMapAdapter(); } + @Override + public Adapter caseEnumListHolder(EnumListHolder object) + { + return createEnumListHolderAdapter(); + } + @Override public Adapter caseOrder(Order object) { @@ -513,6 +520,20 @@ public class Model2AdapterFactory extends AdapterFactoryImpl return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.legacy.model2.EnumListHolder + * Enum List Holder}'. 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. + * + * @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 Order} * '. This default implementation returns null so that we can easily ignore cases; it's useful 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 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); } @@ -573,6 +582,21 @@ public class Model2Switch return null; } + /** + * Returns the result of interpreting the object as an instance of 'Enum List Holder'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Enum List Holder'. + * @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 'Order'. This * implementation returns null; returning a non-null result will terminate the switch. 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; + +/** + * A representation of the model object 'Enum List Holder'. + *

+ * The following features are supported: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model2.EnumListHolder#getEnumList Enum List}
  • + *
+ *

+ * + * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getEnumListHolder() + * @model + * @generated + */ +public interface EnumListHolder extends EObject +{ + /** + * Returns the value of the 'Enum List' 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}. + *

+ * If the meaning of the 'Enum List' attribute list isn't clear, there really should be more of a description + * here... + *

+ * + * + * @return the value of the 'Enum List' attribute list. + * @see org.eclipse.emf.cdo.tests.model1.VAT + * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getEnumListHolder_EnumList() + * @model + * @generated + */ + EList 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 'Integer To String Map' map. * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_IntegerToStringMap() - * @model mapType="org.eclipse.emf.cdo.tests.model2.IntegerToStringMap" + * @model mapType= + * "org.eclipse.emf.cdo.tests.model2.IntegerToStringMap" * @generated */ EMap getIntegerToStringMap(); @@ -108,7 +109,8 @@ public interface MapHolder extends EObject * * @return the value of the 'String To Address Containment Map' map. * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_StringToAddressContainmentMap() - * @model mapType="org.eclipse.emf.cdo.tests.model2.StringToAddressContainmentMap" + * @model mapType= + * "org.eclipse.emf.cdo.tests.model2.StringToAddressContainmentMap" * @generated */ EMap getStringToAddressContainmentMap(); @@ -125,7 +127,8 @@ public interface MapHolder extends EObject * * @return the value of the 'String To Address Reference Map' map. * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_StringToAddressReferenceMap() - * @model mapType="org.eclipse.emf.cdo.tests.model2.StringToAddressReferenceMap" + * @model mapType= + * "org.eclipse.emf.cdo.tests.model2.StringToAddressReferenceMap" * @generated */ EMap getStringToAddressReferenceMap(); @@ -160,7 +163,8 @@ public interface MapHolder extends EObject * * @return the value of the 'EObject To EObject Key Contained Map' map. * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_EObjectToEObjectKeyContainedMap() - * @model mapType="org.eclipse.emf.cdo.tests.model2.EObjectToEObjectKeyContainedMap" + * @model mapType= + * "org.eclipse.emf.cdo.tests.model2.EObjectToEObjectKeyContainedMap" * @generated */ EMap getEObjectToEObjectKeyContainedMap(); @@ -177,7 +181,8 @@ public interface MapHolder extends EObject * * @return the value of the 'EObject To EObject Both Contained Map' map. * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_EObjectToEObjectBothContainedMap() - * @model mapType="org.eclipse.emf.cdo.tests.model2.EObjectToEObjectBothContainedMap" + * @model mapType= + * "org.eclipse.emf.cdo.tests.model2.EObjectToEObjectBothContainedMap" * @generated */ EMap getEObjectToEObjectBothContainedMap(); @@ -194,7 +199,8 @@ public interface MapHolder extends EObject * * @return the value of the 'EObject To EObject Value Contained Map' map. * @see org.eclipse.emf.cdo.tests.model2.Model2Package#getMapHolder_EObjectToEObjectValueContainedMap() - * @model mapType="org.eclipse.emf.cdo.tests.model2.EObjectToEObjectValueContainedMap" + * @model mapType= + * "org.eclipse.emf.cdo.tests.model2.EObjectToEObjectValueContainedMap" * @generated */ EMap 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 @@ -108,6 +108,14 @@ public interface Model2Factory extends EFactory */ MapHolder createMapHolder(); + /** + * Returns a new object of class 'Enum List Holder'. + * + * @return a new object of class 'Enum List Holder'. + * @generated + */ + EnumListHolder createEnumListHolder(); + /** * Returns 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 @@ -1142,6 +1142,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 + * Enum List Holder}' class. + * + * @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 'Enum List' attribute list. + * + * @generated + * @ordered + */ + int ENUM_LIST_HOLDER__ENUM_LIST = 0; + + /** + * The number of structural features of the 'Enum List Holder' class. + * + * @generated + * @ordered + */ + int ENUM_LIST_HOLDER_FEATURE_COUNT = 1; + /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model2.SpecialPurchaseOrder * Special Purchase Order}'. @@ -2302,6 +2329,27 @@ public interface Model2Package extends EPackage */ EReference getEObjectToEObjectValueContainedMap_Value(); + /** + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model2.EnumListHolder + * Enum List Holder}'. + * + * @return the meta object for class 'Enum List Holder'. + * @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 + * Enum List}'. + * + * @return the meta object for the attribute list 'Enum List'. + * @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. * @@ -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 + * Enum List Holder}' class. + * + * @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 'Enum List' attribute list feature. + * + * @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; + +/** + * An implementation of the model object 'Enum List Holder'. + *

+ * The following features are implemented: + *

    + *
  • {@link org.eclipse.emf.cdo.tests.model2.impl.EnumListHolderImpl#getEnumList Enum List}
  • + *
+ *

+ * + * @generated + */ +public class EnumListHolderImpl extends CDOObjectImpl implements EnumListHolder +{ + /** + * + * + * @generated + */ + protected EnumListHolderImpl() + { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model2Package.Literals.ENUM_LIST_HOLDER; + } + + /** + * + * + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getEnumList() + { + return (EList)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"); } @@ -335,6 +338,17 @@ public class Model2FactoryImpl extends EFactoryImpl implements Model2Factory return eObjectToEObjectValueContainedMap; } + /** + * + * + * @generated + */ + public EnumListHolder createEnumListHolder() + { + EnumListHolderImpl enumListHolder = new EnumListHolderImpl(); + return enumListHolder; + } + /** * * 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; @@ -172,6 +173,13 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package */ private EClass eObjectToEObjectValueContainedMapEClass = null; + /** + * + * + * @generated + */ + private EClass enumListHolderEClass = null; + /** * Creates an instance of the model Package, registered with {@link org.eclipse.emf.ecore.EPackage.Registry * EPackage.Registry} by the package package URI value. @@ -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; @@ -1258,6 +1265,26 @@ public class Model2PackageImpl extends EPackageImpl implements Model2Package return (EReference)eObjectToEObjectValueContainedMapEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + public EClass getEnumListHolder() + { + return enumListHolderEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getEnumListHolder_EnumList() + { + return (EAttribute)enumListHolderEClass.getEStructuralFeatures().get(0); + } + /** * * @@ -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; @@ -205,6 +206,12 @@ public class Model2AdapterFactory extends AdapterFactoryImpl return createEObjectToEObjectValueContainedMapAdapter(); } + @Override + public Adapter caseEnumListHolder(EnumListHolder object) + { + return createEnumListHolderAdapter(); + } + @Override public Adapter caseOrder(Order object) { @@ -513,6 +520,20 @@ public class Model2AdapterFactory extends AdapterFactoryImpl return null; } + /** + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model2.EnumListHolder + * Enum List Holder}'. 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. + * + * @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 Order}'. This default implementation returns null so that we can easily ignore cases; it's useful to 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 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); } @@ -573,6 +582,21 @@ public class Model2Switch return null; } + /** + * Returns the result of interpreting the object as an instance of 'Enum List Holder'. This implementation returns null; returning a non-null result will terminate the switch. + * + * @param object + * the target of the switch. + * @return the result of interpreting the object as an instance of 'Enum List Holder'. + * @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 'Order'. This * implementation returns null; returning a non-null result will terminate the switch. -- cgit v1.2.3