summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-04-12 04:25:11 (EDT)
committerEike Stepper2008-04-12 04:25:11 (EDT)
commit7f0567e2f8484a9bd4b0ebd8eb6f1c95673a6acf (patch)
tree1408c8c855201ed4664f3b062d8c55410287853d
parent9916b05077f73502dea9313c36c4f1f7f37c2bad (diff)
downloadcdo-7f0567e2f8484a9bd4b0ebd8eb6f1c95673a6acf.zip
cdo-7f0567e2f8484a9bd4b0ebd8eb6f1c95673a6acf.tar.gz
cdo-7f0567e2f8484a9bd4b0ebd8eb6f1c95673a6acf.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.ecore4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/Model1PackageImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java21
4 files changed, 25 insertions, 4 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 74fe9ce..7f1f538 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/model/model1.ecore
@@ -23,8 +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"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="preferred" 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/Supplier.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/Supplier.java
index 0e92c98..9c36a6e 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
@@ -54,7 +54,7 @@ public interface Supplier extends Address
* @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"
+ * @model default="true"
* @generated
*/
boolean isPreferred();
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 516c203..19c2516 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
@@ -678,7 +678,7 @@ 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,
+ initEAttribute(getSupplier_Preferred(), ecorePackage.getEBoolean(), "preferred", "true", 0, 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);
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java
index 25208d4..7d7409c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/impl/SupplierImpl.java
@@ -19,6 +19,7 @@ import org.eclipse.emf.ecore.EClass;
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#getPurchaseOrders <em>Purchase Orders</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.tests.model1.impl.SupplierImpl#isPreferred <em>Preferred</em>}</li>
* </ul>
* </p>
*
@@ -58,4 +59,24 @@ public class SupplierImpl extends AddressImpl implements Supplier
return (EList<PurchaseOrder>)eGet(Model1Package.Literals.SUPPLIER__PURCHASE_ORDERS, true);
}
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean isPreferred()
+ {
+ return ((Boolean)eGet(Model1Package.Literals.SUPPLIER__PREFERRED, true)).booleanValue();
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setPreferred(boolean newPreferred)
+ {
+ eSet(Model1Package.Literals.SUPPLIER__PREFERRED, new Boolean(newPreferred));
+ }
+
} // SupplierImpl