[ATL] summarising/decorating a model [message #101786] |
Fri, 13 March 2009 06:51  |
Eclipse User |
|
|
|
I'm trying to write a transform that populates an output model
that summaries the input model with references back to the
original input model. I can produce the summary information
but the references that should point back to the input model
get transformed into references in the output model. Clearly
this is the correct standard behaviour. Is there a way that
I can actually have references from the output model
back to the input model?
thanks
Andy.
--
-- ------------------------------------------------------------ -------------
Dr Andy Carpenter
School of Computer Science,
University of Manchester, Manchester M13 9PL, UK
Email: Andy.Carpenter@manchester.ac.uk
Tel: +44 161 275 6168
Fax: +44 161 275 6280
|
|
|
|
Re: [ATL] summarising/decorating a model [message #102036 is a reply to message #101970] |
Tue, 17 March 2009 11:25  |
Eclipse User |
|
|
|
Dennis,
That worked.
thanks
Andy.
"Dennis Wagelaar" <dennis.wagelaar@vub.ac.be> wrote in message
news:gplop6$t02$1@build.eclipse.org...
> Andy Carpenter wrote:
>> I'm trying to write a transform that populates an output model
>> that summaries the input model with references back to the
>> original input model. I can produce the summary information
>> but the references that should point back to the input model
>> get transformed into references in the output model. Clearly
>> this is the correct standard behaviour. Is there a way that
>> I can actually have references from the output model
>> back to the input model?
>>
>> thanks
>> Andy.
>>
>>
>
> Since you're translating the source elements in question in the same
> transformation, they are automatically translated in each assignment
> ('<-'). Therefore, you have to avoid using '<-' for every case in which
> you don't want the automatic tracing mechanism to kick in.
>
> This can be done with the 'refSetValue(name : String, val : oclAny)'
> operation. You can use this operation in the imperative "do" section of a
> matched rule, for example.
>
> Dennis
|
|
|
Powered by
FUDForum. Page generated in 0.11546 seconds