Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-04-07 02:03:19 -0400
committerEike Stepper2013-04-07 02:03:19 -0400
commitaa485a9c0e42766c1fd9fd2f9a8a49d5c2f38718 (patch)
tree19791cc8b8855d9b8336363cb2d34603bf960d3f
parent093c097cb4f5c3845d85d11eb2c1015292fe31fc (diff)
downloadcdo-aa485a9c0e42766c1fd9fd2f9a8a49d5c2f38718.tar.gz
cdo-aa485a9c0e42766c1fd9fd2f9a8a49d5c2f38718.tar.xz
cdo-aa485a9c0e42766c1fd9fd2f9a8a49d5c2f38718.zip
[404152] [Legacy] A String feature with an empty String for default
value can't be set as null https://bugs.eclipse.org/bugs/show_bug.cgi?id=404152
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/model/model6.ecore4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/model/model6.genmodel3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/model/model6.legacy.genmodel3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefault.java52
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Factory.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/Model6Package.java71
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultImpl.java79
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6FactoryImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/Model6PackageImpl.java37
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Factory.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/Model6Package.java53
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/EmptyStringDefaultImpl.java177
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6FactoryImpl.java14
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/Model6PackageImpl.java37
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6AdapterFactory.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/util/Model6Switch.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6AdapterFactory.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/util/Model6Switch.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/generateTestModels.launch3
19 files changed, 656 insertions, 4 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 6392bafec4..aac5ec5129 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.ecore
@@ -120,4 +120,8 @@
unsettable="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="MyString" instanceClassName="java.lang.String"/>
+ <eClassifiers xsi:type="ecore:EClass" name="EmptyStringDefault">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="attribute" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ defaultValueLiteral=""/>
+ </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 9cfd2ab677..df63fb6f98 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model6/model/model6.genmodel
@@ -96,5 +96,8 @@
<genClasses ecoreClass="model6.ecore#//HasNillableAttribute">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//HasNillableAttribute/nillable"/>
</genClasses>
+ <genClasses ecoreClass="model6.ecore#//EmptyStringDefault">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//EmptyStringDefault/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 9641098598..12384f6a1a 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
@@ -94,5 +94,8 @@
<genClasses ecoreClass="model6.ecore#//HasNillableAttribute">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//HasNillableAttribute/nillable"/>
</genClasses>
+ <genClasses ecoreClass="model6.ecore#//EmptyStringDefault">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model6.ecore#//EmptyStringDefault/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
new file mode 100644
index 0000000000..f8ad45c85b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/EmptyStringDefault.java
@@ -0,0 +1,52 @@
+/**
+ */
+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</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault#getAttribute <em>Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.emf.cdo.tests.model6.Model6Package#getEmptyStringDefault()
+ * @model
+ * @generated
+ */
+public interface EmptyStringDefault 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 #setAttribute(String)
+ * @see org.eclipse.emf.cdo.tests.model6.Model6Package#getEmptyStringDefault_Attribute()
+ * @model default=""
+ * @generated
+ */
+ String getAttribute();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault#getAttribute <em>Attribute</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Attribute</em>' attribute.
+ * @see #getAttribute()
+ * @generated
+ */
+ void setAttribute(String value);
+
+} // EmptyStringDefault
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 df50674143..0da75f9727 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
@@ -188,6 +188,15 @@ public interface Model6Factory extends EFactory
HasNillableAttribute createHasNillableAttribute();
/**
+ * Returns a new object of class '<em>Empty String Default</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Empty String Default</em>'.
+ * @generated
+ */
+ EmptyStringDefault createEmptyStringDefault();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the package supported by this factory.
diff --git a/plugins/org.eclipse.emf.cdo.tests.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 74f687f2dc..170f243895 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
@@ -825,6 +825,34 @@ public interface Model6Package extends EPackage
int HAS_NILLABLE_ATTRIBUTE_FEATURE_COUNT = 1;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultImpl <em>Empty String Default</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultImpl
+ * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getEmptyStringDefault()
+ * @generated
+ */
+ int EMPTY_STRING_DEFAULT = 21;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_STRING_DEFAULT__ATTRIBUTE = 0;
+
+ /**
+ * The number of structural features of the '<em>Empty String Default</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ 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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -832,7 +860,7 @@ public interface Model6Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getMyEnum()
* @generated
*/
- int MY_ENUM = 21;
+ int MY_ENUM = 22;
/**
* The meta object id for the '<em>My String</em>' data type.
@@ -842,7 +870,7 @@ public interface Model6Package extends EPackage
* @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getMyString()
* @generated
*/
- int MY_STRING = 22;
+ int MY_STRING = 23;
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.Root <em>Root</em>}'. <!--
@@ -1418,6 +1446,27 @@ public interface Model6Package extends EPackage
EAttribute getHasNillableAttribute_Nillable();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault <em>Empty String Default</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Empty String Default</em>'.
+ * @see org.eclipse.emf.cdo.tests.model6.EmptyStringDefault
+ * @generated
+ */
+ EClass getEmptyStringDefault();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault#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.EmptyStringDefault#getAttribute()
+ * @see #getEmptyStringDefault()
+ * @generated
+ */
+ EAttribute getEmptyStringDefault_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 -->
@@ -1943,6 +1992,24 @@ public interface Model6Package extends EPackage
EAttribute HAS_NILLABLE_ATTRIBUTE__NILLABLE = eINSTANCE.getHasNillableAttribute_Nillable();
/**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultImpl <em>Empty String Default</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultImpl
+ * @see org.eclipse.emf.cdo.tests.model6.impl.Model6PackageImpl#getEmptyStringDefault()
+ * @generated
+ */
+ EClass EMPTY_STRING_DEFAULT = eINSTANCE.getEmptyStringDefault();
+
+ /**
+ * The meta object literal for the '<em><b>Attribute</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ 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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
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
new file mode 100644
index 0000000000..b5dbe4342a
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/impl/EmptyStringDefaultImpl.java
@@ -0,0 +1,79 @@
+/**
+ */
+package org.eclipse.emf.cdo.tests.model6.impl;
+
+import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault;
+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</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model6.impl.EmptyStringDefaultImpl#getAttribute <em>Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EmptyStringDefaultImpl extends CDOObjectImpl implements EmptyStringDefault
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EmptyStringDefaultImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model6Package.Literals.EMPTY_STRING_DEFAULT;
+ }
+
+ /**
+ * <!-- 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__ATTRIBUTE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setAttribute(String newAttribute)
+ {
+ eSet(Model6Package.Literals.EMPTY_STRING_DEFAULT__ATTRIBUTE, newAttribute);
+ }
+
+} //EmptyStringDefaultImpl
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 593491a334..7dce67bb56 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
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model6.C;
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.F;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute;
@@ -132,6 +133,8 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory
return createThing();
case Model6Package.HAS_NILLABLE_ATTRIBUTE:
return createHasNillableAttribute();
+ case Model6Package.EMPTY_STRING_DEFAULT:
+ return createEmptyStringDefault();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -389,6 +392,17 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory
* <!-- end-user-doc -->
* @generated
*/
+ public EmptyStringDefault createEmptyStringDefault()
+ {
+ EmptyStringDefaultImpl emptyStringDefault = new EmptyStringDefaultImpl();
+ return emptyStringDefault;
+ }
+
+ /**
+ * <!-- 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 20e8185de9..80e6262404 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
@@ -12,6 +12,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.HasNillableAttribute;
import org.eclipse.emf.cdo.tests.model6.Holdable;
import org.eclipse.emf.cdo.tests.model6.Holder;
@@ -184,6 +185,13 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
* <!-- end-user-doc -->
* @generated
*/
+ private EClass emptyStringDefaultEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EEnum myEnumEEnum = null;
/**
@@ -779,6 +787,26 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getEmptyStringDefault()
+ {
+ return emptyStringDefaultEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEmptyStringDefault_Attribute()
+ {
+ return (EAttribute)emptyStringDefaultEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EEnum getMyEnum()
{
return myEnumEEnum;
@@ -898,6 +926,9 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
hasNillableAttributeEClass = createEClass(HAS_NILLABLE_ATTRIBUTE);
createEAttribute(hasNillableAttributeEClass, HAS_NILLABLE_ATTRIBUTE__NILLABLE);
+ emptyStringDefaultEClass = createEClass(EMPTY_STRING_DEFAULT);
+ createEAttribute(emptyStringDefaultEClass, EMPTY_STRING_DEFAULT__ATTRIBUTE);
+
// Create enums
myEnumEEnum = createEEnum(MY_ENUM);
@@ -1102,6 +1133,12 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
HasNillableAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
+ initEClass(emptyStringDefaultEClass, EmptyStringDefault.class, "EmptyStringDefault", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEmptyStringDefault_Attribute(), ecorePackage.getEString(), "attribute", "", 0, 1,
+ EmptyStringDefault.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 30d99739f6..8059524e19 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
@@ -9,6 +9,7 @@ import org.eclipse.emf.cdo.tests.model6.C;
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.F;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute;
@@ -215,6 +216,15 @@ public interface Model6Factory extends EFactory, org.eclipse.emf.cdo.tests.model
HasNillableAttribute createHasNillableAttribute();
/**
+ * Returns a new object of class '<em>Empty String Default</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Empty String Default</em>'.
+ * @generated
+ */
+ EmptyStringDefault createEmptyStringDefault();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
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 02e30e6a7c..eef5b78dc9 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
@@ -837,6 +837,34 @@ public interface Model6Package extends EPackage, org.eclipse.emf.cdo.tests.model
int HAS_NILLABLE_ATTRIBUTE_FEATURE_COUNT = 1;
/**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model6.legacy.impl.EmptyStringDefaultImpl <em>Empty String Default</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model6.legacy.impl.EmptyStringDefaultImpl
+ * @see org.eclipse.emf.cdo.tests.model6.legacy.impl.Model6PackageImpl#getEmptyStringDefault()
+ * @generated
+ */
+ int EMPTY_STRING_DEFAULT = 21;
+
+ /**
+ * The feature id for the '<em><b>Attribute</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EMPTY_STRING_DEFAULT__ATTRIBUTE = 0;
+
+ /**
+ * The number of structural features of the '<em>Empty String Default</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ 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.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -844,7 +872,7 @@ public interface Model6Package extends EPackage, org.eclipse.emf.cdo.tests.model
* @see org.eclipse.emf.cdo.tests.model6.legacy.impl.Model6PackageImpl#getMyEnum()
* @generated
*/
- int MY_ENUM = 21;
+ int MY_ENUM = 22;
/**
* The meta object id for the '<em>My String</em>' data type.
@@ -854,7 +882,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 = 22;
+ int MY_STRING = 23;
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.Root <em>Root</em>}'.
@@ -1443,6 +1471,27 @@ public interface Model6Package extends EPackage, org.eclipse.emf.cdo.tests.model
EAttribute getHasNillableAttribute_Nillable();
/**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault <em>Empty String Default</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Empty String Default</em>'.
+ * @see org.eclipse.emf.cdo.tests.model6.EmptyStringDefault
+ * @generated
+ */
+ EClass getEmptyStringDefault();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault#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.EmptyStringDefault#getAttribute()
+ * @see #getEmptyStringDefault()
+ * @generated
+ */
+ EAttribute getEmptyStringDefault_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 -->
diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/EmptyStringDefaultImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/EmptyStringDefaultImpl.java
new file mode 100644
index 0000000000..4310c1d7cb
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/EmptyStringDefaultImpl.java
@@ -0,0 +1,177 @@
+/**
+ */
+package org.eclipse.emf.cdo.tests.model6.legacy.impl;
+
+import org.eclipse.emf.cdo.tests.model6.EmptyStringDefault;
+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</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model6.legacy.impl.EmptyStringDefaultImpl#getAttribute <em>Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EmptyStringDefaultImpl extends EObjectImpl implements EmptyStringDefault
+{
+ /**
+ * 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;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EmptyStringDefaultImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model6Package.eINSTANCE.getEmptyStringDefault();
+ }
+
+ /**
+ * <!-- 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;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, Model6Package.EMPTY_STRING_DEFAULT__ATTRIBUTE,
+ oldAttribute, attribute));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case Model6Package.EMPTY_STRING_DEFAULT__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__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__ATTRIBUTE:
+ setAttribute(ATTRIBUTE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model6Package.EMPTY_STRING_DEFAULT__ATTRIBUTE:
+ return ATTRIBUTE_EDEFAULT == null ? attribute != null : !ATTRIBUTE_EDEFAULT.equals(attribute);
+ }
+ 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: ");
+ result.append(attribute);
+ result.append(')');
+ return result.toString();
+ }
+
+} //EmptyStringDefaultImpl
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 197aac1dce..0f14b2ff1c 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
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model6.C;
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.F;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute;
@@ -132,6 +133,8 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory
return createThing();
case Model6Package.HAS_NILLABLE_ATTRIBUTE:
return createHasNillableAttribute();
+ case Model6Package.EMPTY_STRING_DEFAULT:
+ return createEmptyStringDefault();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -389,6 +392,17 @@ public class Model6FactoryImpl extends EFactoryImpl implements Model6Factory
* <!-- end-user-doc -->
* @generated
*/
+ public EmptyStringDefault createEmptyStringDefault()
+ {
+ EmptyStringDefaultImpl emptyStringDefault = new EmptyStringDefaultImpl();
+ return emptyStringDefault;
+ }
+
+ /**
+ * <!-- 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 4d0a7db55b..5a46272f0d 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
@@ -12,6 +12,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.HasNillableAttribute;
import org.eclipse.emf.cdo.tests.model6.Holdable;
import org.eclipse.emf.cdo.tests.model6.Holder;
@@ -184,6 +185,13 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
* <!-- end-user-doc -->
* @generated
*/
+ private EClass emptyStringDefaultEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
private EEnum myEnumEEnum = null;
/**
@@ -779,6 +787,26 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
* <!-- end-user-doc -->
* @generated
*/
+ public EClass getEmptyStringDefault()
+ {
+ return emptyStringDefaultEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEmptyStringDefault_Attribute()
+ {
+ return (EAttribute)emptyStringDefaultEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EEnum getMyEnum()
{
return myEnumEEnum;
@@ -898,6 +926,9 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
hasNillableAttributeEClass = createEClass(HAS_NILLABLE_ATTRIBUTE);
createEAttribute(hasNillableAttributeEClass, HAS_NILLABLE_ATTRIBUTE__NILLABLE);
+ emptyStringDefaultEClass = createEClass(EMPTY_STRING_DEFAULT);
+ createEAttribute(emptyStringDefaultEClass, EMPTY_STRING_DEFAULT__ATTRIBUTE);
+
// Create enums
myEnumEEnum = createEEnum(MY_ENUM);
@@ -1102,6 +1133,12 @@ public class Model6PackageImpl extends EPackageImpl implements Model6Package
HasNillableAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
+ initEClass(emptyStringDefaultEClass, EmptyStringDefault.class, "EmptyStringDefault", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getEmptyStringDefault_Attribute(), ecorePackage.getEString(), "attribute", "", 0, 1,
+ EmptyStringDefault.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 5ea991ad6f..31b9ee82d7 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
@@ -9,6 +9,7 @@ import org.eclipse.emf.cdo.tests.model6.C;
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.F;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute;
@@ -222,6 +223,12 @@ public class Model6AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseEmptyStringDefault(EmptyStringDefault object)
+ {
+ return createEmptyStringDefaultAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -558,6 +565,21 @@ public class Model6AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault <em>Empty String Default</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.EmptyStringDefault
+ * @generated
+ */
+ public Adapter createEmptyStringDefaultAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns 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 80befece87..40e605daf4 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
@@ -9,6 +9,7 @@ import org.eclipse.emf.cdo.tests.model6.C;
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.F;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute;
@@ -289,6 +290,14 @@ public class Model6Switch<T>
result = defaultCase(theEObject);
return result;
}
+ case Model6Package.EMPTY_STRING_DEFAULT:
+ {
+ EmptyStringDefault emptyStringDefault = (EmptyStringDefault)theEObject;
+ T result = caseEmptyStringDefault(emptyStringDefault);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -631,6 +640,22 @@ public class Model6Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Empty String Default</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>Empty String Default</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEmptyStringDefault(EmptyStringDefault object)
+ {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns 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 a1b5c3eb02..8c083670e5 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
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model6.C;
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.F;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute;
@@ -225,6 +226,12 @@ public class Model6AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseEmptyStringDefault(EmptyStringDefault object)
+ {
+ return createEmptyStringDefaultAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -546,6 +553,21 @@ public class Model6AdapterFactory extends AdapterFactoryImpl
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model6.EmptyStringDefault <em>Empty String Default</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.EmptyStringDefault
+ * @generated
+ */
+ public Adapter createEmptyStringDefaultAdapter()
+ {
+ return null;
+ }
+
+ /**
* Creates a new adapter for the default case.
* <!-- begin-user-doc --> This default implementation returns null. <!--
* end-user-doc -->
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 a70064a285..3b0af07168 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
@@ -17,6 +17,7 @@ import org.eclipse.emf.cdo.tests.model6.C;
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.F;
import org.eclipse.emf.cdo.tests.model6.G;
import org.eclipse.emf.cdo.tests.model6.HasNillableAttribute;
@@ -287,6 +288,14 @@ public class Model6Switch<T>
result = defaultCase(theEObject);
return result;
}
+ case Model6Package.EMPTY_STRING_DEFAULT:
+ {
+ EmptyStringDefault emptyStringDefault = (EmptyStringDefault)theEObject;
+ T result = caseEmptyStringDefault(emptyStringDefault);
+ if (result == null)
+ result = defaultCase(theEObject);
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -607,6 +616,22 @@ public class Model6Switch<T>
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Empty String Default</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>Empty String Default</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEmptyStringDefault(EmptyStringDefault 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
diff --git a/plugins/org.eclipse.emf.cdo.tests/generateTestModels.launch b/plugins/org.eclipse.emf.cdo.tests/generateTestModels.launch
index 904a5c964e..7cd5284b27 100644
--- a/plugins/org.eclipse.emf.cdo.tests/generateTestModels.launch
+++ b/plugins/org.eclipse.emf.cdo.tests/generateTestModels.launch
@@ -8,6 +8,9 @@
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
+</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.emf.cdo.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>

Back to the top