|Unsettable attribute, intrinsic defaults [message #1001995]
||Thu, 17 January 2013 17:19
given the following simple assignment:
result.floatval := self.floatval;
Both models define "floatval" as an unsettable, lowerBound=0 attribute
of type EFloat. The input model actually is an ecore model as generated
by the XSDEcoreBuilder.
Here's the problem I'm facing: if the input value is unset, then the QVT
engine still ends up in assigning the intrinsic default value of float,
which is defined in
org.eclipse.emf.ecore.impl.EDataTypeImpl.getDefaultValue(). The expected
result would have been that the lvalue remains unset.
Note this special handling is only done for primitive types. For
example, for all xs:integer based types in our XSD model it works,
because those are mapped to java.lang.BigInteger.
I'm not sure yet if this is a missunderstanding on my part, an EMF bug,
or a QVT bug. I traced
QvtOperationalEvaluationVisitorImpl.visitAssignExp() in the debugger bug
could not identify that QVT even cares for unset input attributes.
TIA for any insights!
Powered by FUDForum
. Page generated in 0.01825 seconds