summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-04-12 04:22:31 (EDT)
committerEike Stepper2008-04-12 04:22:31 (EDT)
commit9916b05077f73502dea9313c36c4f1f7f37c2bad (patch)
tree5c977616262b41ec74ea11b36c7ee9ef92bd48e8
parentc27b6ef877bb5e7b7cd9d75fa28f10c9e0564f20 (diff)
downloadcdo-9916b05077f73502dea9313c36c4f1f7f37c2bad.zip
cdo-9916b05077f73502dea9313c36c4f1f7f37c2bad.tar.gz
cdo-9916b05077f73502dea9313c36c4f1f7f37c2bad.tar.bz2
[226739] Default value not handle correctly
https://bugs.eclipse.org/bugs/show_bug.cgi?id=226739
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java13
4 files changed, 72 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
index ac921a1..74fe9ce 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
@@ -23,6 +23,8 @@
<eClassifiers xsi:type="ecore:EClass" name="Supplier" eSuperTypes="#//Address">
<eStructuralFeatures xsi:type="ecore:EReference" name="purchaseOrders" upperBound="-1"
eType="#//PurchaseOrder" eOpposite="#//PurchaseOrder/supplier"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="preferred" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Customer" eSuperTypes="#//Address">
<eStructuralFeatures xsi:type="ecore:EReference" name="salesOrders" unique="false"
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java
index 4683ac0..411017a 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Model1Package.java
@@ -314,13 +314,21 @@ public interface Model1Package extends EPackage
int SUPPLIER__PURCHASE_ORDERS = ADDRESS_FEATURE_COUNT + 0;
/**
+ * The feature id for the '<em><b>Preferred</b></em>' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int SUPPLIER__PREFERRED = ADDRESS_FEATURE_COUNT + 1;
+
+ /**
* The number of structural features of the '<em>Supplier</em>' class. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @generated
* @ordered
*/
- int SUPPLIER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 1;
+ int SUPPLIER_FEATURE_COUNT = ADDRESS_FEATURE_COUNT + 2;
/**
* The meta object id for the '{@link org.eclipse.emf.cdo.tests.model1.impl.CustomerImpl <em>Customer</em>}' class.
@@ -614,6 +622,17 @@ public interface Model1Package extends EPackage
EReference getSupplier_PurchaseOrders();
/**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred <em>Preferred</em>}'.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the attribute '<em>Preferred</em>'.
+ * @see org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred()
+ * @see #getSupplier()
+ * @generated
+ */
+ EAttribute getSupplier_Preferred();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.tests.model1.PurchaseOrder <em>Purchase Order</em>}'.
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
@@ -998,6 +1017,14 @@ public interface Model1Package extends EPackage
EReference SUPPLIER__PURCHASE_ORDERS = eINSTANCE.getSupplier_PurchaseOrders();
/**
+ * The meta object literal for the '<em><b>Preferred</b></em>' attribute feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EAttribute SUPPLIER__PREFERRED = eINSTANCE.getSupplier_Preferred();
+
+ /**
* The meta object literal for the '{@link org.eclipse.emf.cdo.tests.model1.impl.PurchaseOrderImpl <em>Purchase Order</em>}'
* class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java
index 21fda2e..0e92c98 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java
@@ -14,6 +14,7 @@ import org.eclipse.emf.common.util.EList;
* The following features are supported:
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model1.Supplier#getPurchaseOrders <em>Purchase Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred <em>Preferred</em>}</li>
* </ul>
* </p>
*
@@ -41,4 +42,32 @@ public interface Supplier extends Address
*/
EList<PurchaseOrder> getPurchaseOrders();
+ /**
+ * Returns the value of the '<em><b>Preferred</b></em>' attribute. The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Preferred</em>' attribute isn't clear, there really should be more of a description
+ * here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Preferred</em>' attribute.
+ * @see #setPreferred(boolean)
+ * @see org.eclipse.emf.cdo.tests.model1.Model1Package#getSupplier_Preferred()
+ * @model default="true" required="true"
+ * @generated
+ */
+ boolean isPreferred();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.tests.model1.Supplier#isPreferred <em>Preferred</em>}'
+ * attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Preferred</em>' attribute.
+ * @see #isPreferred()
+ * @generated
+ */
+ void setPreferred(boolean value);
+
} // Supplier
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
index 170f738..516c203 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java
@@ -241,6 +241,16 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
*
* @generated
*/
+ public EAttribute getSupplier_Preferred()
+ {
+ return (EAttribute)supplierEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
public EClass getPurchaseOrder()
{
return purchaseOrderEClass;
@@ -569,6 +579,7 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
supplierEClass = createEClass(SUPPLIER);
createEReference(supplierEClass, SUPPLIER__PURCHASE_ORDERS);
+ createEAttribute(supplierEClass, SUPPLIER__PREFERRED);
customerEClass = createEClass(CUSTOMER);
createEReference(customerEClass, CUSTOMER__SALES_ORDERS);
@@ -667,6 +678,8 @@ public class Model1PackageImpl extends EPackageImpl implements Model1Package
initEReference(getSupplier_PurchaseOrders(), this.getPurchaseOrder(), this.getPurchaseOrder_Supplier(),
"purchaseOrders", null, 0, -1, Supplier.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE,
IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getSupplier_Preferred(), ecorePackage.getEBoolean(), "preferred", "true", 1, 1, Supplier.class,
+ !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getCustomer_SalesOrders(), this.getSalesOrder(), this.getSalesOrder_Customer(), "salesOrders", null,