[TCS] Optional keywords in TCS vs. boolean attributes in metamodel... [message #378841] |
Tue, 31 July 2007 14:28 |
Eclipse User |
|
|
|
Originally posted by: escalise.gmail.com
Hello all!
I'm using TCS to generate a model of data to be used by a chain of ATL
transformations.
I have a boolean attribute in a class of the metamodel. In the DSL, this
attribute is associated with an optional keyword.
Metamodel excerpt:
class MyClass {
...
attribute booleanFlag : Boolean ;
...
}
TCS excerpt:
template MyClass
: ...
(booleanFlag ? "optionalKeyword") "otherkword" ":" otherAttr ","
...
;
The problem is in the output model. The attribute booleanFlag does not
appear in the model (it must be "false") when the "optionalKeyword" was
not found in the DSL text. I could expect this behavior if the attribute
is optional, but that's not the case.
Any idea?
Thanks in advance
Eugenio Scalise
|
|
|
Re: [TCS] Optional keywords in TCS vs. boolean attributes in metamodel... [message #378842 is a reply to message #378841] |
Tue, 31 July 2007 15:04 |
Eclipse User |
|
|
|
Originally posted by: quentin.glineur.obeo.fr
This is a multi-part message in MIME format.
--------------090003090005090006060402
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Hi,
The attribute does not appear in your model because "false" is the
default value of your attribute. Thus the model handler (EMF) does not
serialize it (even though it does consider that the attribute exists and
that its value is false - thanks to the metamodel)
Regards,
Quentin GLINEUR
Eugenio Scalise a
|
|
|
Re: [TCS] Optional keywords in TCS vs. boolean attributes in metamodel... [message #378843 is a reply to message #378842] |
Tue, 31 July 2007 15:14 |
Eclipse User |
|
|
|
Originally posted by: escalise.gmail.com
ok, thanks a lot!
Quentin Glineur wrote:
> Hi,
>
> The attribute does not appear in your model because "false" is the
> default value of your attribute. Thus the model handler (EMF) does not
> serialize it (even though it does consider that the attribute exists and
> that its value is false - thanks to the metamodel)
>
> Regards,
> Quentin GLINEUR
>
> Eugenio Scalise a écrit :
>> Hello all!
>>
>> I'm using TCS to generate a model of data to be used by a chain of ATL
>> transformations.
>>
>> I have a boolean attribute in a class of the metamodel. In the DSL,
>> this attribute is associated with an optional keyword.
>>
>> Metamodel excerpt:
>>
>> class MyClass {
>> ...
>> attribute booleanFlag : Boolean ;
>> ...
>> }
>>
>> TCS excerpt:
>>
>> template MyClass
>> : ...
>> (booleanFlag ? "optionalKeyword") "otherkword" ":" otherAttr ","
>> ...
>> ;
>>
>> The problem is in the output model. The attribute booleanFlag does not
>> appear in the model (it must be "false") when the "optionalKeyword"
>> was not found in the DSL text. I could expect this behavior if the
>> attribute is optional, but that's not the case.
>>
>> Any idea?
>>
>> Thanks in advance
>>
>> Eugenio Scalise
|
|
|
Re: [TCS] Optional keywords in TCS vs. boolean attributes in metamodel... [message #602826 is a reply to message #378841] |
Tue, 31 July 2007 15:04 |
Eclipse User |
|
|
|
Originally posted by: quentin.glineur.obeo.fr
This is a multi-part message in MIME format.
--------------090003090005090006060402
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Hi,
The attribute does not appear in your model because "false" is the
default value of your attribute. Thus the model handler (EMF) does not
serialize it (even though it does consider that the attribute exists and
that its value is false - thanks to the metamodel)
Regards,
Quentin GLINEUR
Eugenio Scalise a
|
|
|
Re: [TCS] Optional keywords in TCS vs. boolean attributes in metamodel... [message #602831 is a reply to message #378842] |
Tue, 31 July 2007 15:14 |
Eclipse User |
|
|
|
Originally posted by: escalise.gmail.com
ok, thanks a lot!
Quentin Glineur wrote:
> Hi,
>
> The attribute does not appear in your model because "false" is the
> default value of your attribute. Thus the model handler (EMF) does not
> serialize it (even though it does consider that the attribute exists and
> that its value is false - thanks to the metamodel)
>
> Regards,
> Quentin GLINEUR
>
> Eugenio Scalise a écrit :
>> Hello all!
>>
>> I'm using TCS to generate a model of data to be used by a chain of ATL
>> transformations.
>>
>> I have a boolean attribute in a class of the metamodel. In the DSL,
>> this attribute is associated with an optional keyword.
>>
>> Metamodel excerpt:
>>
>> class MyClass {
>> ...
>> attribute booleanFlag : Boolean ;
>> ...
>> }
>>
>> TCS excerpt:
>>
>> template MyClass
>> : ...
>> (booleanFlag ? "optionalKeyword") "otherkword" ":" otherAttr ","
>> ...
>> ;
>>
>> The problem is in the output model. The attribute booleanFlag does not
>> appear in the model (it must be "false") when the "optionalKeyword"
>> was not found in the DSL text. I could expect this behavior if the
>> attribute is optional, but that's not the case.
>>
>> Any idea?
>>
>> Thanks in advance
>>
>> Eugenio Scalise
|
|
|
Powered by
FUDForum. Page generated in 0.03458 seconds