[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.m2m] Re: [QVTO] Nullable enumerations
|
Hi Alex,
At the moment there is no direct support for this in QVTO.
Could you please raise bugzilla so we can track this down
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=M2M&component=QVT_OML-Engine
Regards,
/Radek
On Tue, 25 Aug 2009 00:02:26 +0200, Alex <alex.leites@xxxxxxxxx> wrote:
Is there any way QVT could directly support EMF/Ecore nullable
enumerations pattern? Currently assigning to an attribute using this
pattern in QVT requires additional cast of the EnumLiteral being
assinged to the "wrapper" EDataType ...
Some background: There appears to be a standard EMF/Ecore pattern for
nullable enumerations (enumerations that can have a null value in
addition to their null values) - using an additional "wrapper" EDataType
as a type for an attribute, linked to the appropriate EEnum via
ExtendedMetadata annotation. This patterns is used by XSD-derived Ecore
models, and is frequently referred to as pattern of choice for this kind
of thing on EMF forums. (The only alternative is to introduce a special
NULL EnumLiteral into each nullable enum.)
This should only take a check for relationship between EDataType and
enumeration literal for the assignment. Admittedly, this would have to
reach into Ecore annotations, which is somewhat unusual I assume for QVT
compiler, but the pattern appears to be common enough and important
enough to justify supporting it directly...
Thank you,
Alex