diff options
author | Christian W. Damus | 2013-04-08 18:44:21 +0000 |
---|---|---|
committer | Christian W. Damus | 2013-04-08 18:44:21 +0000 |
commit | 12ca526329a9749cc565a70e876e4d5a5460bb9d (patch) | |
tree | 77cdc16af74c3f4e22d74b677cff3551c33889e6 | |
parent | c1d0a66405208c386ebc046a8f9b979a78dc1bfa (diff) | |
download | cdo-12ca526329a9749cc565a70e876e4d5a5460bb9d.tar.gz cdo-12ca526329a9749cc565a70e876e4d5a5460bb9d.tar.xz cdo-12ca526329a9749cc565a70e876e4d5a5460bb9d.zip |
[405191] Add unsettable EString attribute to model6 test model.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=405191
21 files changed, 840 insertions, 46 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.ecore b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.ecore index aac5ec5129..700052b709 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.ecore +++ b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.ecore @@ -124,4 +124,8 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="attribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral=""/> </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="EmptyStringDefaultUnsettable"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="attribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" + defaultValueLiteral="" unsettable="true"/> + </eClassifiers> </ecore:EPackage> diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.genmodel b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.genmodel index df63fb6f98..53759dd594 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.genmodel +++ b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.genmodel @@ -99,5 +99,8 @@ <genClasses ecoreClass="model6.ecore#//EmptyStringDefault"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//EmptyStringDefault/attribute"/> </genClasses> + <genClasses ecoreClass="model6.ecore#//EmptyStringDefaultUnsettable"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//EmptyStringDefaultUnsettable/attribute"/> + </genClasses> </genPackages> </genmodel:GenModel> diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.legacy.genmodel b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.legacy.genmodel index 12384f6a1a..3f60bed1bf 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.legacy.genmodel +++ b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.legacy.genmodel @@ -97,5 +97,8 @@ <genClasses ecoreClass="model6.ecore#//EmptyStringDefault"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//EmptyStringDefault/attribute"/> </genClasses> + <genClasses ecoreClass="model6.ecore#//EmptyStringDefaultUnsettable"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//EmptyStringDefaultUnsettable/attribute"/> + </genClasses> </genPackages> </genmodel:GenModel> diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefault.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefault.java index f8ad45c85b..a8711c9094 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefault.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefault.java @@ -1,4 +1,12 @@ -/** +/* + * Copyright (c) 2004 - 2012 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.model6; diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefaultUnsettable.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefaultUnsettable.java new file mode 100644 index 0000000000..649e80e585 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefaultUnsettable.java @@ -0,0 +1,79 @@ +/** + */ +package org.eclipse.emf.cdo.tests.model6; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Empty String Default Unsettable</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute <em>Attribute</em>}</li> + * </ul> + * </p> + * + * @see org.eclipse.emf.cdo.tests.model6.Model6Package#getEmptyStringDefaultUnsettable() + * @model + * @generated + */ +public interface EmptyStringDefaultUnsettable extends EObject +{ + /** + * Returns the value of the '<em><b>Attribute</b></em>' attribute. + * The default value is <code>""</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Attribute</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Attribute</em>' attribute. + * @see #isSetAttribute() + * @see #unsetAttribute() + * @see #setAttribute(String) + * @see org.eclipse.emf.cdo.tests.model6.Model6Package#getEmptyStringDefaultUnsettable_Attribute() + * @model default="" unsettable="true" + * @generated + */ + String getAttribute(); + + /** + * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute <em>Attribute</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Attribute</em>' attribute. + * @see #isSetAttribute() + * @see #unsetAttribute() + * @see #getAttribute() + * @generated + */ + void setAttribute(String value); + + /** + * Unsets the value of the '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute <em>Attribute</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isSetAttribute() + * @see #getAttribute() + * @see #setAttribute(String) + * @generated + */ + void unsetAttribute(); + + /** + * Returns whether the value of the '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute <em>Attribute</em>}' attribute is set. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return whether the value of the '<em>Attribute</em>' attribute is set. + * @see #unsetAttribute() + * @see #getAttribute() + * @see #setAttribute(String) + * @generated + */ + boolean isSetAttribute(); + +} // EmptyStringDefaultUnsettable diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Factory.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Factory.java index 0da75f9727..d35f766db3 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Factory.java @@ -197,11 +197,20 @@ public interface Model6Factory extends EFactory EmptyStringDefault createEmptyStringDefault(); /** - * Returns the package supported by this factory. - * <!-- begin-user-doc --> <!-- end-user-doc --> - * @return the package supported by this factory. + * Returns a new object of class '<em>Empty String Default Unsettable</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Empty String Default Unsettable</em>'. * @generated */ + EmptyStringDefaultUnsettable createEmptyStringDefaultUnsettable(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ Model6Package getModel6Package(); } // Model6Factory diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Package.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Package.java index 170f243895..7d545aa3ac 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Package.java @@ -853,14 +853,42 @@ public interface Model6Package extends EPackage int EMPTY_STRING_DEFAULT_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}' enum. + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultUnsettableImpl <em>Empty String Default Unsettable</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.emf.cdo.tests.model6.MyEnum - * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getMyEnum() + * @see org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultUnsettableImpl + * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getEmptyStringDefaultUnsettable() * @generated */ - int MY_ENUM = 22; + int EMPTY_STRING_DEFAULT_UNSETTABLE = 22; + + /** + * The feature id for the '<em><b>Attribute</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE = 0; + + /** + * The number of structural features of the '<em>Empty String Default Unsettable</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int EMPTY_STRING_DEFAULT_UNSETTABLE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.tests.model6.MyEnum + * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getMyEnum() + * @generated + */ + int MY_ENUM = 23; /** * The meta object id for the '<em>My String</em>' data type. @@ -870,7 +898,7 @@ public interface Model6Package extends EPackage * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getMyString() * @generated */ - int MY_STRING = 23; + int MY_STRING = 24; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.Root <em>Root</em>}'. <!-- @@ -1467,13 +1495,34 @@ public interface Model6Package extends EPackage EAttribute getEmptyStringDefault_Attribute(); /** - * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}'. + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable <em>Empty String Default Unsettable</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for enum '<em>My Enum</em>'. - * @see org.eclipse.emf.cdo.tests.model6.MyEnum + * @return the meta object for class '<em>Empty String Default Unsettable</em>'. + * @see org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable * @generated */ + EClass getEmptyStringDefaultUnsettable(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute <em>Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Attribute</em>'. + * @see org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute() + * @see #getEmptyStringDefaultUnsettable() + * @generated + */ + EAttribute getEmptyStringDefaultUnsettable_Attribute(); + + /** + * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>My Enum</em>'. + * @see org.eclipse.emf.cdo.tests.model6.MyEnum + * @generated + */ EEnum getMyEnum(); /** @@ -2010,13 +2059,31 @@ public interface Model6Package extends EPackage EAttribute EMPTY_STRING_DEFAULT__ATTRIBUTE = eINSTANCE.getEmptyStringDefault_Attribute(); /** - * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}' enum. + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultUnsettableImpl <em>Empty String Default Unsettable</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.emf.cdo.tests.model6.MyEnum - * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getMyEnum() + * @see org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultUnsettableImpl + * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getEmptyStringDefaultUnsettable() * @generated */ + EClass EMPTY_STRING_DEFAULT_UNSETTABLE = eINSTANCE.getEmptyStringDefaultUnsettable(); + + /** + * The meta object literal for the '<em><b>Attribute</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE = eINSTANCE.getEmptyStringDefaultUnsettable_Attribute(); + + /** + * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.tests.model6.MyEnum + * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getMyEnum() + * @generated + */ EEnum MY_ENUM = eINSTANCE.getMyEnum(); /** diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultImpl.java index b5dbe4342a..b4c01c0515 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultImpl.java @@ -1,4 +1,12 @@ -/** +/* + * Copyright (c) 2004 - 2012 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.model6.impl; @@ -76,4 +84,4 @@ public class EmptyStringDefaultImpl extends CDOObjectImpl implements EmptyString eSet(Model6Package.Literals.EMPTY_STRING_DEFAULT__ATTRIBUTE, newAttribute); } -} //EmptyStringDefaultImpl +} // EmptyStringDefaultImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultUnsettableImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultUnsettableImpl.java new file mode 100644 index 0000000000..975437dc35 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultUnsettableImpl.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2004 - 2012 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.model6.impl; + +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; +import org.eclipse.emf.cdo.tests.model6.Model6Package; + +import org.eclipse.emf.internal.cdo.CDOObjectImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Empty String Default Unsettable</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultUnsettableImpl#getAttribute <em>Attribute</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class EmptyStringDefaultUnsettableImpl extends CDOObjectImpl implements EmptyStringDefaultUnsettable +{ + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected EmptyStringDefaultUnsettableImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model6Package.Literals.EMPTY_STRING_DEFAULT_UNSETTABLE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected int eStaticFeatureCount() + { + return 0; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAttribute() + { + return (String)eGet(Model6Package.Literals.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE, true); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAttribute(String newAttribute) + { + eSet(Model6Package.Literals.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE, newAttribute); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void unsetAttribute() + { + eUnset(Model6Package.Literals.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isSetAttribute() + { + return eIsSet(Model6Package.Literals.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE); + } + +} // EmptyStringDefaultUnsettableImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6FactoryImpl.java index 7dce67bb56..5998df6e73 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6FactoryImpl.java @@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.D; import org.eclipse.emf.cdo.tests.model6.E; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.F; import org.eclipse.emf.cdo.tests.model6.G; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; @@ -135,6 +136,8 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory return createHasNillableAttribute(); case Model6Package.EMPTY_STRING_DEFAULT: return createEmptyStringDefault(); + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE: + return createEmptyStringDefaultUnsettable(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -403,6 +406,17 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory * <!-- end-user-doc --> * @generated */ + public EmptyStringDefaultUnsettable createEmptyStringDefaultUnsettable() + { + EmptyStringDefaultUnsettableImpl emptyStringDefaultUnsettable = new EmptyStringDefaultUnsettableImpl(); + return emptyStringDefaultUnsettable; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public MyEnum createMyEnumFromString(EDataType eDataType, String initialValue) { MyEnum result = MyEnum.get(initialValue); diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6PackageImpl.java index 80e6262404..7d803bde36 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6PackageImpl.java @@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.model6.impl; import org.eclipse.emf.cdo.tests.model6.BaseObject; import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; import org.eclipse.emf.cdo.tests.model6.Holdable; import org.eclipse.emf.cdo.tests.model6.Holder; @@ -192,6 +193,13 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package * <!-- end-user-doc --> * @generated */ + private EClass emptyStringDefaultUnsettableEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EEnum myEnumEEnum = null; /** @@ -807,6 +815,26 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package * <!-- end-user-doc --> * @generated */ + public EClass getEmptyStringDefaultUnsettable() + { + return emptyStringDefaultUnsettableEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getEmptyStringDefaultUnsettable_Attribute() + { + return (EAttribute)emptyStringDefaultUnsettableEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EEnum getMyEnum() { return myEnumEEnum; @@ -929,6 +957,9 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package emptyStringDefaultEClass = createEClass(EMPTY_STRING_DEFAULT); createEAttribute(emptyStringDefaultEClass, EMPTY_STRING_DEFAULT__ATTRIBUTE); + emptyStringDefaultUnsettableEClass = createEClass(EMPTY_STRING_DEFAULT_UNSETTABLE); + createEAttribute(emptyStringDefaultUnsettableEClass, EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE); + // Create enums myEnumEEnum = createEEnum(MY_ENUM); @@ -1139,6 +1170,12 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package EmptyStringDefault.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(emptyStringDefaultUnsettableEClass, EmptyStringDefaultUnsettable.class, "EmptyStringDefaultUnsettable", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getEmptyStringDefaultUnsettable_Attribute(), ecorePackage.getEString(), "attribute", "", 0, 1, + EmptyStringDefaultUnsettable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize enums and add enum literals initEEnum(myEnumEEnum, MyEnum.class, "MyEnum"); addEEnumLiteral(myEnumEEnum, MyEnum.ZERO); diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Factory.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Factory.java index 8059524e19..7fcb3c493c 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Factory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Factory.java @@ -10,6 +10,7 @@ import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.D; import org.eclipse.emf.cdo.tests.model6.E; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.F; import org.eclipse.emf.cdo.tests.model6.G; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; @@ -225,12 +226,21 @@ public interface Model6Factory extends EFactory, org.eclipse.emf.cdo.tests.model EmptyStringDefault createEmptyStringDefault(); /** - * Returns the package supported by this factory. + * Returns a new object of class '<em>Empty String Default Unsettable</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the package supported by this factory. + * @return a new object of class '<em>Empty String Default Unsettable</em>'. * @generated */ + EmptyStringDefaultUnsettable createEmptyStringDefaultUnsettable(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the package supported by this factory. + * @generated + */ Model6Package getModel6Package(); } // Model6Factory diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Package.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Package.java index eef5b78dc9..f195ae6192 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Package.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Package.java @@ -865,14 +865,42 @@ public interface Model6Package extends EPackage, org.eclipse.emf.cdo.tests.model int EMPTY_STRING_DEFAULT_FEATURE_COUNT = 1; /** - * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}' enum. + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.legacy.impl.EmptyStringDefaultUnsettableImpl <em>Empty String Default Unsettable</em>}' class. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @see org.eclipse.emf.cdo.tests.model6.MyEnum - * @see org.eclipse.emf.cdo.tests.model6.legacy.impl.Model6PackageImpl#getMyEnum() + * @see org.eclipse.emf.cdo.tests.model6.legacy.impl.EmptyStringDefaultUnsettableImpl + * @see org.eclipse.emf.cdo.tests.model6.legacy.impl.Model6PackageImpl#getEmptyStringDefaultUnsettable() * @generated */ - int MY_ENUM = 22; + int EMPTY_STRING_DEFAULT_UNSETTABLE = 22; + + /** + * The feature id for the '<em><b>Attribute</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE = 0; + + /** + * The number of structural features of the '<em>Empty String Default Unsettable</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int EMPTY_STRING_DEFAULT_UNSETTABLE_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.eclipse.emf.cdo.tests.model6.MyEnum + * @see org.eclipse.emf.cdo.tests.model6.legacy.impl.Model6PackageImpl#getMyEnum() + * @generated + */ + int MY_ENUM = 23; /** * The meta object id for the '<em>My String</em>' data type. @@ -882,7 +910,7 @@ public interface Model6Package extends EPackage, org.eclipse.emf.cdo.tests.model * @see org.eclipse.emf.cdo.tests.model6.legacy.impl.Model6PackageImpl#getMyString() * @generated */ - int MY_STRING = 23; + int MY_STRING = 24; /** * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.Root <em>Root</em>}'. @@ -1492,13 +1520,34 @@ public interface Model6Package extends EPackage, org.eclipse.emf.cdo.tests.model EAttribute getEmptyStringDefault_Attribute(); /** - * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}'. + * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable <em>Empty String Default Unsettable</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @return the meta object for enum '<em>My Enum</em>'. - * @see org.eclipse.emf.cdo.tests.model6.MyEnum + * @return the meta object for class '<em>Empty String Default Unsettable</em>'. + * @see org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable * @generated */ + EClass getEmptyStringDefaultUnsettable(); + + /** + * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute <em>Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Attribute</em>'. + * @see org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable#getAttribute() + * @see #getEmptyStringDefaultUnsettable() + * @generated + */ + EAttribute getEmptyStringDefaultUnsettable_Attribute(); + + /** + * Returns the meta object for enum '{@link org.eclipse.emf.cdo.tests.model6.MyEnum <em>My Enum</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>My Enum</em>'. + * @see org.eclipse.emf.cdo.tests.model6.MyEnum + * @generated + */ EEnum getMyEnum(); /** diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/EmptyStringDefaultUnsettableImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/EmptyStringDefaultUnsettableImpl.java new file mode 100644 index 0000000000..a6d4d1c7d7 --- /dev/null +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/EmptyStringDefaultUnsettableImpl.java @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2004 - 2012 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.model6.legacy.impl; + +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; +import org.eclipse.emf.cdo.tests.model6.legacy.Model6Package; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.EObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Empty String Default Unsettable</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.eclipse.emf.cdo.tests.model6.legacy.impl.EmptyStringDefaultUnsettableImpl#getAttribute <em>Attribute</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class EmptyStringDefaultUnsettableImpl extends EObjectImpl implements EmptyStringDefaultUnsettable +{ + /** + * The default value of the '{@link #getAttribute() <em>Attribute</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAttribute() + * @generated + * @ordered + */ + protected static final String ATTRIBUTE_EDEFAULT = ""; + + /** + * The cached value of the '{@link #getAttribute() <em>Attribute</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAttribute() + * @generated + * @ordered + */ + protected String attribute = ATTRIBUTE_EDEFAULT; + + /** + * This is true if the Attribute attribute has been set. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + protected boolean attributeESet; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected EmptyStringDefaultUnsettableImpl() + { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() + { + return Model6Package.eINSTANCE.getEmptyStringDefaultUnsettable(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAttribute() + { + return attribute; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAttribute(String newAttribute) + { + String oldAttribute = attribute; + attribute = newAttribute; + boolean oldAttributeESet = attributeESet; + attributeESet = true; + if (eNotificationRequired()) + { + eNotify(new ENotificationImpl(this, Notification.SET, Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE, + oldAttribute, attribute, !oldAttributeESet)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void unsetAttribute() + { + String oldAttribute = attribute; + boolean oldAttributeESet = attributeESet; + attribute = ATTRIBUTE_EDEFAULT; + attributeESet = false; + if (eNotificationRequired()) + { + eNotify(new ENotificationImpl(this, Notification.UNSET, Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE, + oldAttribute, ATTRIBUTE_EDEFAULT, oldAttributeESet)); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isSetAttribute() + { + return attributeESet; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) + { + switch (featureID) + { + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE: + return getAttribute(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) + { + switch (featureID) + { + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE: + setAttribute((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) + { + switch (featureID) + { + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE: + unsetAttribute(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) + { + switch (featureID) + { + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE: + return isSetAttribute(); + } + 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(" (attribute: "); + if (attributeESet) + { + result.append(attribute); + } + else + { + result.append("<unset>"); + } + result.append(')'); + return result.toString(); + } + +} // EmptyStringDefaultUnsettableImpl diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6FactoryImpl.java index 0f14b2ff1c..b758f54a91 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6FactoryImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6FactoryImpl.java @@ -18,6 +18,7 @@ import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.D; import org.eclipse.emf.cdo.tests.model6.E; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.F; import org.eclipse.emf.cdo.tests.model6.G; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; @@ -135,6 +136,8 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory return createHasNillableAttribute(); case Model6Package.EMPTY_STRING_DEFAULT: return createEmptyStringDefault(); + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE: + return createEmptyStringDefaultUnsettable(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -403,6 +406,17 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory * <!-- end-user-doc --> * @generated */ + public EmptyStringDefaultUnsettable createEmptyStringDefaultUnsettable() + { + EmptyStringDefaultUnsettableImpl emptyStringDefaultUnsettable = new EmptyStringDefaultUnsettableImpl(); + return emptyStringDefaultUnsettable; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public MyEnum createMyEnumFromString(EDataType eDataType, String initialValue) { MyEnum result = MyEnum.get(initialValue); diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6PackageImpl.java index 5a46272f0d..d519a48d7b 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6PackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6PackageImpl.java @@ -13,6 +13,7 @@ package org.eclipse.emf.cdo.tests.model6.legacy.impl; import org.eclipse.emf.cdo.tests.model6.BaseObject; import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; import org.eclipse.emf.cdo.tests.model6.Holdable; import org.eclipse.emf.cdo.tests.model6.Holder; @@ -192,6 +193,13 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package * <!-- end-user-doc --> * @generated */ + private EClass emptyStringDefaultUnsettableEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ private EEnum myEnumEEnum = null; /** @@ -807,6 +815,26 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package * <!-- end-user-doc --> * @generated */ + public EClass getEmptyStringDefaultUnsettable() + { + return emptyStringDefaultUnsettableEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getEmptyStringDefaultUnsettable_Attribute() + { + return (EAttribute)emptyStringDefaultUnsettableEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public EEnum getMyEnum() { return myEnumEEnum; @@ -929,6 +957,9 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package emptyStringDefaultEClass = createEClass(EMPTY_STRING_DEFAULT); createEAttribute(emptyStringDefaultEClass, EMPTY_STRING_DEFAULT__ATTRIBUTE); + emptyStringDefaultUnsettableEClass = createEClass(EMPTY_STRING_DEFAULT_UNSETTABLE); + createEAttribute(emptyStringDefaultUnsettableEClass, EMPTY_STRING_DEFAULT_UNSETTABLE__ATTRIBUTE); + // Create enums myEnumEEnum = createEEnum(MY_ENUM); @@ -1139,6 +1170,12 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package EmptyStringDefault.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(emptyStringDefaultUnsettableEClass, EmptyStringDefaultUnsettable.class, "EmptyStringDefaultUnsettable", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getEmptyStringDefaultUnsettable_Attribute(), ecorePackage.getEString(), "attribute", "", 0, 1, + EmptyStringDefaultUnsettable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, + IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize enums and add enum literals initEEnum(myEnumEEnum, MyEnum.class, "MyEnum"); addEEnumLiteral(myEnumEEnum, MyEnum.ZERO); diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6AdapterFactory.java index 31b9ee82d7..ea22113c77 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6AdapterFactory.java @@ -1,4 +1,12 @@ -/** +/* + * Copyright (c) 2004 - 2012 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.model6.legacy.util; @@ -10,6 +18,7 @@ import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.D; import org.eclipse.emf.cdo.tests.model6.E; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.F; import org.eclipse.emf.cdo.tests.model6.G; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; @@ -229,6 +238,12 @@ public class Model6AdapterFactory extends AdapterFactoryImpl } @Override + public Adapter caseEmptyStringDefaultUnsettable(EmptyStringDefaultUnsettable object) + { + return createEmptyStringDefaultUnsettableAdapter(); + } + + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); @@ -580,13 +595,28 @@ public class Model6AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable <em>Empty String Default Unsettable</em>}'. * <!-- begin-user-doc --> - * This default implementation returns null. + * 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.model6.EmptyStringDefaultUnsettable * @generated */ + public Adapter createEmptyStringDefaultUnsettableAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @return the new adapter. + * @generated + */ public Adapter createEObjectAdapter() { return null; diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6Switch.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6Switch.java index 40e605daf4..eb28bbd3c9 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6Switch.java @@ -1,4 +1,12 @@ -/** +/* + * Copyright (c) 2004 - 2012 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.model6.legacy.util; @@ -10,6 +18,7 @@ import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.D; import org.eclipse.emf.cdo.tests.model6.E; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.F; import org.eclipse.emf.cdo.tests.model6.G; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; @@ -298,6 +307,14 @@ public class Model6Switch<T> result = defaultCase(theEObject); return result; } + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE: + { + EmptyStringDefaultUnsettable emptyStringDefaultUnsettable = (EmptyStringDefaultUnsettable)theEObject; + T result = caseEmptyStringDefaultUnsettable(emptyStringDefaultUnsettable); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } @@ -656,16 +673,32 @@ public class Model6Switch<T> } /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * Returns the result of interpreting the object as an instance of '<em>Empty String Default Unsettable</em>'. * <!-- begin-user-doc --> * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. + * 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>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @return the result of interpreting the object as an instance of '<em>Empty String Default Unsettable</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ + public T caseEmptyStringDefaultUnsettable(EmptyStringDefaultUnsettable object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ public T defaultCase(EObject object) { return null; diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6AdapterFactory.java index 8c083670e5..e69e75ec99 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6AdapterFactory.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6AdapterFactory.java @@ -18,11 +18,13 @@ import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.D; import org.eclipse.emf.cdo.tests.model6.E; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.F; import org.eclipse.emf.cdo.tests.model6.G; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; import org.eclipse.emf.cdo.tests.model6.Holdable; import org.eclipse.emf.cdo.tests.model6.Holder; +import org.eclipse.emf.cdo.tests.model6.Model6Package; import org.eclipse.emf.cdo.tests.model6.MyEnumList; import org.eclipse.emf.cdo.tests.model6.MyEnumListUnsettable; import org.eclipse.emf.cdo.tests.model6.PropertiesMap; @@ -31,7 +33,6 @@ import org.eclipse.emf.cdo.tests.model6.ReferenceObject; import org.eclipse.emf.cdo.tests.model6.Root; import org.eclipse.emf.cdo.tests.model6.Thing; import org.eclipse.emf.cdo.tests.model6.UnorderedList; -import org.eclipse.emf.cdo.tests.model6.legacy.Model6Package; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -232,6 +233,12 @@ public class Model6AdapterFactory extends AdapterFactoryImpl } @Override + public Adapter caseEmptyStringDefaultUnsettable(EmptyStringDefaultUnsettable object) + { + return createEmptyStringDefaultUnsettableAdapter(); + } + + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); @@ -568,12 +575,27 @@ public class Model6AdapterFactory extends AdapterFactoryImpl } /** - * Creates a new adapter for the default case. - * <!-- begin-user-doc --> This default implementation returns null. <!-- - * end-user-doc --> + * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable <em>Empty String Default Unsettable</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> * @return the new adapter. + * @see org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable * @generated */ + public Adapter createEmptyStringDefaultUnsettableAdapter() + { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> This default implementation returns null. <!-- + * end-user-doc --> + * @return the new adapter. + * @generated + */ public Adapter createEObjectAdapter() { return null; diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6Switch.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6Switch.java index 3b0af07168..73c5106250 100644 --- a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6Switch.java +++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6Switch.java @@ -18,11 +18,13 @@ import org.eclipse.emf.cdo.tests.model6.ContainmentObject; import org.eclipse.emf.cdo.tests.model6.D; import org.eclipse.emf.cdo.tests.model6.E; import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault; +import org.eclipse.emf.cdo.tests.model6.EmptyStringDefaultUnsettable; import org.eclipse.emf.cdo.tests.model6.F; import org.eclipse.emf.cdo.tests.model6.G; import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute; import org.eclipse.emf.cdo.tests.model6.Holdable; import org.eclipse.emf.cdo.tests.model6.Holder; +import org.eclipse.emf.cdo.tests.model6.Model6Package; import org.eclipse.emf.cdo.tests.model6.MyEnumList; import org.eclipse.emf.cdo.tests.model6.MyEnumListUnsettable; import org.eclipse.emf.cdo.tests.model6.PropertiesMap; @@ -31,7 +33,6 @@ import org.eclipse.emf.cdo.tests.model6.ReferenceObject; import org.eclipse.emf.cdo.tests.model6.Root; import org.eclipse.emf.cdo.tests.model6.Thing; import org.eclipse.emf.cdo.tests.model6.UnorderedList; -import org.eclipse.emf.cdo.tests.model6.legacy.Model6Package; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; @@ -296,6 +297,14 @@ public class Model6Switch<T> result = defaultCase(theEObject); return result; } + case Model6Package.EMPTY_STRING_DEFAULT_UNSETTABLE: + { + EmptyStringDefaultUnsettable emptyStringDefaultUnsettable = (EmptyStringDefaultUnsettable)theEObject; + T result = caseEmptyStringDefaultUnsettable(emptyStringDefaultUnsettable); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } @@ -632,15 +641,31 @@ public class Model6Switch<T> } /** - * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. - * <!-- begin-user-doc --> This - * implementation returns null; returning a non-null result will terminate the switch, but this is the last case - * anyway. <!-- end-user-doc --> + * Returns the result of interpreting the object as an instance of '<em>Empty String Default Unsettable</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> * @param object the target of the switch. - * @return the result of interpreting the object as an instance of '<em>EObject</em>'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @return the result of interpreting the object as an instance of '<em>Empty String Default Unsettable</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ + public T caseEmptyStringDefaultUnsettable(EmptyStringDefaultUnsettable object) + { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. + * <!-- begin-user-doc --> This + * implementation returns null; returning a non-null result will terminate the switch, but this is the last case + * anyway. <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ public T defaultCase(EObject object) { return null; diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_404152_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_405191_Test.java index f560e1d5c6..f560e1d5c6 100644 --- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_404152_Test.java +++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_405191_Test.java |