Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2016-10-05 15:08:51 +0000
committerEike Stepper2016-10-05 15:08:51 +0000
commit53a350e8a852a2d448ee2ec755bd35e45545795e (patch)
tree64e4d0391fb6309d15efd66abc09ccff1ab428e8 /plugins
parentb63db68693f1df53099f14da7271df94c3428651 (diff)
downloadcdo-53a350e8a852a2d448ee2ec755bd35e45545795e.tar.gz
cdo-53a350e8a852a2d448ee2ec755bd35e45545795e.tar.xz
cdo-53a350e8a852a2d448ee2ec755bd35e45545795e.zip
[503573] Adapt method in CDODeltaNotificationImpl fails to adapt for GregorianCalendar
https://bugs.eclipse.org/bugs/show_bug.cgi?id=503573
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy.genmodel4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/CustomType.java99
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java86
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/WithCustomType.java51
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java60
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/WithCustomTypeImpl.java80
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Factory.java16
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Package.java86
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5FactoryImpl.java41
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5PackageImpl.java60
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/WithCustomTypeImpl.java181
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5AdapterFactory.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5Switch.java35
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java32
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java35
19 files changed, 913 insertions, 43 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
index 2759ffe0c0..94c16bc3a0 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.ecore
@@ -83,4 +83,8 @@
eOpposite="#//Parent/favourite"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="WithCustomType">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="#//CustomType"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="CustomType" instanceClassName="org.eclipse.emf.cdo.tests.model5.CustomType"/>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
index e558bcccc4..a3932d9430 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.genmodel
@@ -13,6 +13,7 @@
literalsInterface="false" extensibleProviderFactory="true" childCreationExtenders="true"
ecorePackage="model5.ecore#/">
<genDataTypes ecoreDataType="model5.ecore#//IntArray"/>
+ <genDataTypes ecoreDataType="model5.ecore#//CustomType"/>
<genClasses ecoreClass="model5.ecore#//TestFeatureMap">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//TestFeatureMap/managers"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference model5.ecore#//TestFeatureMap/doctors"/>
@@ -63,5 +64,8 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//Child/preferredBy"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//Child/name"/>
</genClasses>
+ <genClasses ecoreClass="model5.ecore#//WithCustomType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//WithCustomType/value"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy.genmodel b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy.genmodel
index d99c8e7b10..cc9d4c7d94 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy.genmodel
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/model/model5.legacy.genmodel
@@ -12,6 +12,7 @@
literalsInterface="false" extensibleProviderFactory="true" childCreationExtenders="true"
ecorePackage="model5.ecore#/">
<genDataTypes ecoreDataType="model5.ecore#//IntArray"/>
+ <genDataTypes ecoreDataType="model5.ecore#//CustomType"/>
<genClasses ecoreClass="model5.ecore#//TestFeatureMap">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//TestFeatureMap/managers"/>
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference model5.ecore#//TestFeatureMap/doctors"/>
@@ -62,5 +63,8 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference model5.ecore#//Child/preferredBy"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//Child/name"/>
</genClasses>
+ <genClasses ecoreClass="model5.ecore#//WithCustomType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute model5.ecore#//WithCustomType/value"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/CustomType.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/CustomType.java
new file mode 100644
index 0000000000..06a8e4458e
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/CustomType.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2004-2016 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.model5;
+
+/**
+ * @author Eike Stepper
+ */
+public final class CustomType
+{
+ private static final String PREFIX = "CustomType:";
+
+ private final int x;
+
+ public CustomType(int x)
+ {
+ this.x = x;
+ }
+
+ public int getX()
+ {
+ return x;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + x;
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+
+ if (obj == null)
+ {
+ return false;
+ }
+
+ if (getClass() != obj.getClass())
+ {
+ return false;
+ }
+
+ CustomType other = (CustomType)obj;
+ if (x != other.x)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return Integer.toString(x);
+ }
+
+ public static CustomType createFromString(String initialValue)
+ {
+ if (initialValue == null)
+ {
+ return null;
+ }
+
+ if (!initialValue.startsWith(PREFIX))
+ {
+ throw new IllegalArgumentException();
+ }
+
+ int x = Integer.parseInt(initialValue.substring(PREFIX.length()));
+ return new CustomType(x);
+ }
+
+ public static String convertToString(Object instanceValue)
+ {
+ if (instanceValue == null)
+ {
+ return null;
+ }
+
+ return PREFIX + ((CustomType)instanceValue).getX();
+ }
+}
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
index 1f552a50e4..10910507ed 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Factory.java
@@ -150,11 +150,20 @@ public interface Model5Factory extends EFactory
Child createChild();
/**
- * Returns a new object of class '<em>Gen List Of String</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return a new object of class '<em>Gen List Of String</em>'.
+ * Returns a new object of class '<em>With Custom Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>With Custom Type</em>'.
* @generated
*/
+ WithCustomType createWithCustomType();
+
+ /**
+ * Returns a new object of class '<em>Gen List Of String</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return a new object of class '<em>Gen List Of String</em>'.
+ * @generated
+ */
GenListOfString createGenListOfString();
/**
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
index 27ab0589b3..b89d95f7c6 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/Model5Package.java
@@ -516,12 +516,50 @@ public interface Model5Package extends EPackage
int CHILD_FEATURE_COUNT = 3;
/**
- * The meta object id for the '<em>Int Array</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getIntArray()
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model5.impl.WithCustomTypeImpl <em>With Custom Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model5.impl.WithCustomTypeImpl
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getWithCustomType()
+ * @generated
+ */
+ int WITH_CUSTOM_TYPE = 16;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WITH_CUSTOM_TYPE__VALUE = 0;
+
+ /**
+ * The number of structural features of the '<em>With Custom Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WITH_CUSTOM_TYPE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '<em>Int Array</em>' data type.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
+ int INT_ARRAY = 17;
+
+ /**
+ * The meta object id for the '<em>Custom Type</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model5.CustomType
+ * @see org.eclipse.emf.cdo.tests.model5.impl.Model5PackageImpl#getCustomType()
* @generated
*/
- int INT_ARRAY = 16;
+ int CUSTOM_TYPE = 18;
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.TestFeatureMap <em>Test Feature Map</em>}'.
@@ -863,15 +901,47 @@ public interface Model5Package extends EPackage
EAttribute getChild_Name();
/**
- * Returns the meta object for data type '<em>Int Array</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for data type '<em>Int Array</em>'.
- * @model instanceClass="int[]"
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.WithCustomType <em>With Custom Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>With Custom Type</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.WithCustomType
* @generated
*/
+ EClass getWithCustomType();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model5.WithCustomType#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.WithCustomType#getValue()
+ * @see #getWithCustomType()
+ * @generated
+ */
+ EAttribute getWithCustomType_Value();
+
+ /**
+ * Returns the meta object for data type '<em>Int Array</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Int Array</em>'.
+ * @model instanceClass="int[]"
+ * @generated
+ */
EDataType getIntArray();
/**
+ * Returns the meta object for data type '{@link org.eclipse.emf.cdo.tests.model5.CustomType <em>Custom Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Custom Type</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.CustomType
+ * @model instanceClass="org.eclipse.emf.cdo.tests.model5.CustomType"
+ * @generated
+ */
+ EDataType getCustomType();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfString <em>Gen List Of String</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the meta object for class '<em>Gen List Of String</em>'.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/WithCustomType.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/WithCustomType.java
new file mode 100644
index 0000000000..e2bc58b5a7
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/WithCustomType.java
@@ -0,0 +1,51 @@
+/**
+ */
+package org.eclipse.emf.cdo.tests.model5;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>With Custom Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.WithCustomType#getValue <em>Value</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.emf.cdo.tests.model5.Model5Package#getWithCustomType()
+ * @model
+ * @generated
+ */
+public interface WithCustomType extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Value</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Value</em>' attribute.
+ * @see #setValue(CustomType)
+ * @see org.eclipse.emf.cdo.tests.model5.Model5Package#getWithCustomType_Value()
+ * @model dataType="org.eclipse.emf.cdo.tests.model5.CustomType"
+ * @generated
+ */
+ CustomType getValue();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model5.WithCustomType#getValue <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Value</em>' attribute.
+ * @see #getValue()
+ * @generated
+ */
+ void setValue(CustomType value);
+
+} // WithCustomType
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
index c168549473..776769bfcb 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5FactoryImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.tests.model5.impl;
//import org.eclipse.emf.cdo.tests.model5.*;
import org.eclipse.emf.cdo.tests.model5.Child;
+import org.eclipse.emf.cdo.tests.model5.CustomType;
import org.eclipse.emf.cdo.tests.model5.Doctor;
import org.eclipse.emf.cdo.tests.model5.GenListOfBoolean;
import org.eclipse.emf.cdo.tests.model5.GenListOfChar;
@@ -29,6 +30,7 @@ import org.eclipse.emf.cdo.tests.model5.Model5Factory;
import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
@@ -116,6 +118,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
return createParent();
case Model5Package.CHILD:
return createChild();
+ case Model5Package.WITH_CUSTOM_TYPE:
+ return createWithCustomType();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -132,6 +136,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
{
case Model5Package.INT_ARRAY:
return createIntArrayFromString(eDataType, initialValue);
+ case Model5Package.CUSTOM_TYPE:
+ return createCustomTypeFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -148,6 +154,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
{
case Model5Package.INT_ARRAY:
return convertIntArrayToString(eDataType, instanceValue);
+ case Model5Package.CUSTOM_TYPE:
+ return convertCustomTypeToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -306,9 +314,20 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
+ public WithCustomType createWithCustomType()
+ {
+ WithCustomTypeImpl withCustomType = new WithCustomTypeImpl();
+ return withCustomType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public int[] createIntArrayFromString(EDataType eDataType, String initialValue)
{
return (int[])super.createFromString(initialValue);
@@ -324,6 +343,26 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public CustomType createCustomTypeFromString(EDataType eDataType, String initialValue)
+ {
+ return CustomType.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String convertCustomTypeToString(EDataType eDataType, Object instanceValue)
+ {
+ return CustomType.convertToString(instanceValue);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
index 542185705d..03899cdcb8 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/Model5PackageImpl.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.tests.model5.impl;
import org.eclipse.emf.cdo.tests.model5.Child;
+import org.eclipse.emf.cdo.tests.model5.CustomType;
import org.eclipse.emf.cdo.tests.model5.Doctor;
import org.eclipse.emf.cdo.tests.model5.GenListOfBoolean;
import org.eclipse.emf.cdo.tests.model5.GenListOfChar;
@@ -28,6 +29,7 @@ import org.eclipse.emf.cdo.tests.model5.Model5Factory;
import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
@@ -135,12 +137,26 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
private EClass childEClass = null;
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
+ private EClass withCustomTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
private EDataType intArrayEDataType = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType customTypeEDataType = null;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -524,15 +540,45 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
+ public EClass getWithCustomType()
+ {
+ return withCustomTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getWithCustomType_Value()
+ {
+ return (EAttribute)withCustomTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public EDataType getIntArray()
{
return intArrayEDataType;
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getCustomType()
+ {
+ return customTypeEDataType;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -632,8 +678,12 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
createEReference(childEClass, CHILD__PREFERRED_BY);
createEAttribute(childEClass, CHILD__NAME);
+ withCustomTypeEClass = createEClass(WITH_CUSTOM_TYPE);
+ createEAttribute(withCustomTypeEClass, WITH_CUSTOM_TYPE__VALUE);
+
// Create data types
intArrayEDataType = createEDataType(INT_ARRAY);
+ customTypeEDataType = createEDataType(CUSTOM_TYPE);
}
/**
@@ -765,8 +815,14 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEAttribute(getChild_Name(), ecorePackage.getEString(), "name", null, 0, 1, Child.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(withCustomTypeEClass, WithCustomType.class, "WithCustomType", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getWithCustomType_Value(), getCustomType(), "value", null, 0, 1, WithCustomType.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Initialize data types
initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(customTypeEDataType, CustomType.class, "CustomType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
// Create resource
createResource(eNS_URI);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/WithCustomTypeImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/WithCustomTypeImpl.java
new file mode 100644
index 0000000000..74da2272b1
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/impl/WithCustomTypeImpl.java
@@ -0,0 +1,80 @@
+/**
+ */
+package org.eclipse.emf.cdo.tests.model5.impl;
+
+import org.eclipse.emf.cdo.tests.model5.CustomType;
+import org.eclipse.emf.cdo.tests.model5.Model5Package;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>With Custom Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.impl.WithCustomTypeImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class WithCustomTypeImpl extends CDOObjectImpl implements WithCustomType
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected WithCustomTypeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model5Package.eINSTANCE.getWithCustomType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected int eStaticFeatureCount()
+ {
+ return 0;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomType getValue()
+ {
+ return (CustomType)eGet(Model5Package.eINSTANCE.getWithCustomType_Value(), true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(CustomType newValue)
+ {
+ eSet(Model5Package.eINSTANCE.getWithCustomType_Value(), newValue);
+ }
+
+} // WithCustomTypeImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Factory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Factory.java
index 0f2d25c288..b3ca608dd2 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Factory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Factory.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfString;
import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.ecore.EFactory;
@@ -177,11 +178,20 @@ public interface Model5Factory extends EFactory, org.eclipse.emf.cdo.tests.model
Child createChild();
/**
- * 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>With Custom Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>With Custom Type</em>'.
* @generated
*/
+ WithCustomType createWithCustomType();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
Model5Package getModel5Package();
} // Model5Factory
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Package.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Package.java
index 88e13f20af..4efcec9c66 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/Model5Package.java
@@ -515,12 +515,50 @@ public interface Model5Package extends EPackage, org.eclipse.emf.cdo.tests.model
int CHILD_FEATURE_COUNT = 3;
/**
- * The meta object id for the '<em>Int Array</em>' data type.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @see org.eclipse.emf.cdo.tests.model5.legacy.impl.Model5PackageImpl#getIntArray()
+ * The meta object id for the '{@link org.eclipse.emf.cdo.tests.model5.legacy.impl.WithCustomTypeImpl <em>With Custom Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model5.legacy.impl.WithCustomTypeImpl
+ * @see org.eclipse.emf.cdo.tests.model5.legacy.impl.Model5PackageImpl#getWithCustomType()
+ * @generated
+ */
+ int WITH_CUSTOM_TYPE = 16;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WITH_CUSTOM_TYPE__VALUE = 0;
+
+ /**
+ * The number of structural features of the '<em>With Custom Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int WITH_CUSTOM_TYPE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '<em>Int Array</em>' data type.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model5.legacy.impl.Model5PackageImpl#getIntArray()
+ * @generated
+ */
+ int INT_ARRAY = 17;
+
+ /**
+ * The meta object id for the '<em>Custom Type</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.cdo.tests.model5.CustomType
+ * @see org.eclipse.emf.cdo.tests.model5.legacy.impl.Model5PackageImpl#getCustomType()
* @generated
*/
- int INT_ARRAY = 16;
+ int CUSTOM_TYPE = 18;
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.TestFeatureMap <em>Test Feature Map</em>}'.
@@ -894,15 +932,47 @@ public interface Model5Package extends EPackage, org.eclipse.emf.cdo.tests.model
EAttribute getChild_Name();
/**
- * Returns the meta object for data type '<em>Int Array</em>'.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
- * @return the meta object for data type '<em>Int Array</em>'.
- * @model instanceClass="int[]"
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model5.WithCustomType <em>With Custom Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>With Custom Type</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.WithCustomType
* @generated
*/
+ EClass getWithCustomType();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model5.WithCustomType#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.WithCustomType#getValue()
+ * @see #getWithCustomType()
+ * @generated
+ */
+ EAttribute getWithCustomType_Value();
+
+ /**
+ * Returns the meta object for data type '<em>Int Array</em>'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Int Array</em>'.
+ * @model instanceClass="int[]"
+ * @generated
+ */
EDataType getIntArray();
/**
+ * Returns the meta object for data type '{@link org.eclipse.emf.cdo.tests.model5.CustomType <em>Custom Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Custom Type</em>'.
+ * @see org.eclipse.emf.cdo.tests.model5.CustomType
+ * @model instanceClass="org.eclipse.emf.cdo.tests.model5.CustomType"
+ * @generated
+ */
+ EDataType getCustomType();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5FactoryImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5FactoryImpl.java
index e113d65bcd..86cc7f981c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5FactoryImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5FactoryImpl.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.tests.model5.legacy.impl;
//import org.eclipse.emf.cdo.tests.model5.*;
import org.eclipse.emf.cdo.tests.model5.Child;
+import org.eclipse.emf.cdo.tests.model5.CustomType;
import org.eclipse.emf.cdo.tests.model5.Doctor;
import org.eclipse.emf.cdo.tests.model5.GenListOfBoolean;
import org.eclipse.emf.cdo.tests.model5.GenListOfChar;
@@ -27,6 +28,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfString;
import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.cdo.tests.model5.legacy.Model5Factory;
import org.eclipse.emf.cdo.tests.model5.legacy.Model5Package;
@@ -117,6 +119,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
return createParent();
case Model5Package.CHILD:
return createChild();
+ case Model5Package.WITH_CUSTOM_TYPE:
+ return createWithCustomType();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -133,6 +137,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
{
case Model5Package.INT_ARRAY:
return createIntArrayFromString(eDataType, initialValue);
+ case Model5Package.CUSTOM_TYPE:
+ return createCustomTypeFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -149,6 +155,8 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
{
case Model5Package.INT_ARRAY:
return convertIntArrayToString(eDataType, instanceValue);
+ case Model5Package.CUSTOM_TYPE:
+ return convertCustomTypeToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
@@ -317,9 +325,20 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
+ public WithCustomType createWithCustomType()
+ {
+ WithCustomTypeImpl withCustomType = new WithCustomTypeImpl();
+ return withCustomType;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public int[] createIntArrayFromString(EDataType eDataType, String initialValue)
{
return (int[])super.createFromString(initialValue);
@@ -335,6 +354,26 @@ public class Model5FactoryImpl extends EFactoryImpl implements Model5Factory
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public CustomType createCustomTypeFromString(EDataType eDataType, String initialValue)
+ {
+ return CustomType.createFromString(initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String convertCustomTypeToString(EDataType eDataType, Object instanceValue)
+ {
+ return CustomType.convertToString(instanceValue);
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5PackageImpl.java
index 46ed3724af..ec049c2325 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/Model5PackageImpl.java
@@ -11,6 +11,7 @@
package org.eclipse.emf.cdo.tests.model5.legacy.impl;
import org.eclipse.emf.cdo.tests.model5.Child;
+import org.eclipse.emf.cdo.tests.model5.CustomType;
import org.eclipse.emf.cdo.tests.model5.Doctor;
import org.eclipse.emf.cdo.tests.model5.GenListOfBoolean;
import org.eclipse.emf.cdo.tests.model5.GenListOfChar;
@@ -26,6 +27,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfString;
import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.cdo.tests.model5.legacy.Model5Factory;
import org.eclipse.emf.cdo.tests.model5.legacy.Model5Package;
@@ -141,12 +143,26 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
private EClass childEClass = null;
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
+ private EClass withCustomTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
private EDataType intArrayEDataType = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType customTypeEDataType = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry
* EPackage.Registry} by the package package URI value.
* <p>
@@ -542,15 +558,45 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
}
/**
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
+ public EClass getWithCustomType()
+ {
+ return withCustomTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getWithCustomType_Value()
+ {
+ return (EAttribute)withCustomTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * @generated
+ */
public EDataType getIntArray()
{
return intArrayEDataType;
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getCustomType()
+ {
+ return customTypeEDataType;
+ }
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@@ -632,8 +678,12 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
createEReference(childEClass, CHILD__PREFERRED_BY);
createEAttribute(childEClass, CHILD__NAME);
+ withCustomTypeEClass = createEClass(WITH_CUSTOM_TYPE);
+ createEAttribute(withCustomTypeEClass, WITH_CUSTOM_TYPE__VALUE);
+
// Create data types
intArrayEDataType = createEDataType(INT_ARRAY);
+ customTypeEDataType = createEDataType(CUSTOM_TYPE);
}
/**
@@ -765,8 +815,14 @@ public class Model5PackageImpl extends EPackageImpl implements Model5Package
initEAttribute(getChild_Name(), ecorePackage.getEString(), "name", null, 0, 1, Child.class, !IS_TRANSIENT,
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(withCustomTypeEClass, WithCustomType.class, "WithCustomType", !IS_ABSTRACT, !IS_INTERFACE,
+ IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getWithCustomType_Value(), getCustomType(), "value", null, 0, 1, WithCustomType.class, !IS_TRANSIENT,
+ !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
// Initialize data types
initEDataType(intArrayEDataType, int[].class, "IntArray", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
+ initEDataType(customTypeEDataType, CustomType.class, "CustomType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
// Create resource
createResource(eNS_URI);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/WithCustomTypeImpl.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/WithCustomTypeImpl.java
new file mode 100644
index 0000000000..930b032cf4
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/impl/WithCustomTypeImpl.java
@@ -0,0 +1,181 @@
+/**
+ */
+package org.eclipse.emf.cdo.tests.model5.legacy.impl;
+
+import org.eclipse.emf.cdo.tests.model5.CustomType;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
+import org.eclipse.emf.cdo.tests.model5.legacy.Model5Package;
+
+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>With Custom Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model5.legacy.impl.WithCustomTypeImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class WithCustomTypeImpl extends EObjectImpl implements WithCustomType
+{
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final CustomType VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected CustomType value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected WithCustomTypeImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model5Package.eINSTANCE.getWithCustomType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CustomType getValue()
+ {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(CustomType newValue)
+ {
+ CustomType oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ {
+ eNotify(new ENotificationImpl(this, Notification.SET, Model5Package.WITH_CUSTOM_TYPE__VALUE, oldValue, value));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case Model5Package.WITH_CUSTOM_TYPE__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case Model5Package.WITH_CUSTOM_TYPE__VALUE:
+ setValue((CustomType)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model5Package.WITH_CUSTOM_TYPE__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model5Package.WITH_CUSTOM_TYPE__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ 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(" (value: ");
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} // WithCustomTypeImpl
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5AdapterFactory.java
index 3f966abc01..46444739e5 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5AdapterFactory.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfString;
import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.cdo.tests.model5.legacy.Model5Package;
import org.eclipse.emf.common.notify.Adapter;
@@ -193,6 +194,12 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseWithCustomType(WithCustomType object)
+ {
+ return createWithCustomTypeAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -454,13 +461,28 @@ public class Model5AdapterFactory 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.model5.WithCustomType <em>With Custom Type</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.model5.WithCustomType
* @generated
*/
+ public Adapter createWithCustomTypeAdapter()
+ {
+ 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.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5Switch.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5Switch.java
index a2a95c8b3e..a2242ea83f 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/legacy/util/Model5Switch.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.cdo.tests.model5.GenListOfString;
import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.cdo.tests.model5.legacy.Model5Package;
import org.eclipse.emf.ecore.EClass;
@@ -275,6 +276,16 @@ public class Model5Switch<T>
}
return result;
}
+ case Model5Package.WITH_CUSTOM_TYPE:
+ {
+ WithCustomType withCustomType = (WithCustomType)theEObject;
+ T result = caseWithCustomType(withCustomType);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -537,16 +548,32 @@ public class Model5Switch<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>With Custom Type</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>With Custom Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
+ public T caseWithCustomType(WithCustomType 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.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
index c7b852bba9..e4036d5c39 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5AdapterFactory.java
@@ -28,6 +28,7 @@ import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
@@ -188,6 +189,12 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
@Override
+ public Adapter caseWithCustomType(WithCustomType object)
+ {
+ return createWithCustomTypeAdapter();
+ }
+
+ @Override
public Adapter defaultCase(EObject object)
{
return createEObjectAdapter();
@@ -413,14 +420,29 @@ public class Model5AdapterFactory extends AdapterFactoryImpl
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfString <em>Gen List Of String</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 -->
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.WithCustomType <em>With Custom Type</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.model5.GenListOfString
+ * @see org.eclipse.emf.cdo.tests.model5.WithCustomType
* @generated
*/
+ public Adapter createWithCustomTypeAdapter()
+ {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.cdo.tests.model5.GenListOfString <em>Gen List Of String</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.model5.GenListOfString
+ * @generated
+ */
public Adapter createGenListOfStringAdapter()
{
return null;
diff --git a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
index 8a2a2d43ce..203bdb1a83 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model5/src/org/eclipse/emf/cdo/tests/model5/util/Model5Switch.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.cdo.tests.model5.Manager;
import org.eclipse.emf.cdo.tests.model5.Model5Package;
import org.eclipse.emf.cdo.tests.model5.Parent;
import org.eclipse.emf.cdo.tests.model5.TestFeatureMap;
+import org.eclipse.emf.cdo.tests.model5.WithCustomType;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -265,6 +266,16 @@ public class Model5Switch<T>
}
return result;
}
+ case Model5Package.WITH_CUSTOM_TYPE:
+ {
+ WithCustomType withCustomType = (WithCustomType)theEObject;
+ T result = caseWithCustomType(withCustomType);
+ if (result == null)
+ {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
default:
return defaultCase(theEObject);
}
@@ -487,14 +498,30 @@ public class Model5Switch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Gen List Of String</em>'.
- * <!-- begin-user-doc
- * --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>With Custom Type</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>Gen List Of String</em>'.
+ * @return the result of interpreting the object as an instance of '<em>With Custom Type</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
+ public T caseWithCustomType(WithCustomType object)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Gen List Of String</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>Gen List Of String</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
public T caseGenListOfString(GenListOfString object)
{
return null;

Back to the top