|
|
Re: [ATL] [QVTO] Model Copy/Clone [message #90942 is a reply to message #90894] |
Wed, 01 October 2008 15:12 |
Eclipse User |
|
|
|
Originally posted by: mahdider.students.uni-mainz.de
Hello,
this looks exactly what I'd need for QVTO.
Is such an utility already available there too, or do I have to
implement it myself?
Kind Regards,
Mahdi
Freddy Allilaire schrieb:
> Hi Alexandre,
>
> You could use KM3 to ATL Copier transformation to generate your copier
> transformation:
> http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier
>
> Regards,
> Freddy.
>
>
> Alexandre Torres a écrit :
>> Hi
>> I think that refinement mode isn't working anymore (and to tell you
>> the true, it's too restrictive to be used anyway). The alternative
>> solution may be create a (boring) transformation that copies/clone all
>> elements on both models. And them use superimposition with the real
>> transformation.
>> I guess I can auto-generate this transformation. How are you doing
>> this ? I saw some examples on the "zoo", but can't find how they
>> generated the transformation.
>> Is there an "ATL transformation" that takes a metamodel and generates
>> another ATL transformation that clones any model based on that metamodel?
>> My final goal is create a transformation that refines a model based on
>> another input model (so, I could not use refinement anyway).
>>
>> Thanks
>>
>>
>>
>>
>
|
|
|
|
Re: [ATL] [QVTO] Model Copy/Clone [message #90985 is a reply to message #90942] |
Wed, 01 October 2008 16:42 |
Radomil Dvorak Messages: 249 Registered: July 2009 |
Senior Member |
|
|
Hi Mahdi,
You do not need such an utility with QVTO as its Standard Library defines
clone(), deepClone() operations
for every model element.
See the usage example in the thread "[QVTO] Input model parameter '...' is
read-only!"
Regards,
/Radek
On Wed, 01 Oct 2008 17:12:57 +0200, Mahdi D-Manesh
<mahdider@students.uni-mainz.de> wrote:
> Hello,
>
> this looks exactly what I'd need for QVTO.
> Is such an utility already available there too, or do I have to
> implement it myself?
>
> Kind Regards,
> Mahdi
>
>
> Freddy Allilaire schrieb:
>> Hi Alexandre,
>> You could use KM3 to ATL Copier transformation to generate your copier
>> transformation:
>> http://www.eclipse.org/m2m/atl/atlTransformations/#KM32ATLCo pier
>> Regards,
>> Freddy.
>> Alexandre Torres a écrit :
>>> Hi
>>> I think that refinement mode isn't working anymore (and to tell you
>>> the true, it's too restrictive to be used anyway). The alternative
>>> solution may be create a (boring) transformation that copies/clone all
>>> elements on both models. And them use superimposition with the real
>>> transformation.
>>> I guess I can auto-generate this transformation. How are you doing
>>> this ? I saw some examples on the "zoo", but can't find how they
>>> generated the transformation.
>>> Is there an "ATL transformation" that takes a metamodel and generates
>>> another ATL transformation that clones any model based on that
>>> metamodel?
>>> My final goal is create a transformation that refines a model based on
>>> another input model (so, I could not use refinement anyway).
>>>
>>> Thanks
>>>
>>>
>>>
>>>
>>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
|
|
Re: [ATL] Model Copy/Clone [message #91029 is a reply to message #91015] |
Wed, 01 October 2008 19:47 |
Alexandre Torres Messages: 139 Registered: July 2009 |
Senior Member |
|
|
The error persisted. I think I was able to fix it, commenting the "name"
feature of VariableExp:
...
fv : ATL!VariableExp (
--name <- 's',
referredVariable <- ipe
),
...
v : distinct ATL!NavigationOrAttributeCallExp foreach(sf in sfs) (
name <- sf.name,
source <- src
),
src : distinct ATL!VariableExp foreach(sf in sfs) (
--name <- 's',
referredVariable <- ipe
)
...
The transformation now works with the Am3-Atl bundle. I could them use the
"extract atl model to file" menu option to generate the atl file, and it
worked.
And the best part is, it works on the new ATL, so I need the old bundle
just to generate the clone maker transformation.
After that I tried the clone with a superimposed transformation and it
worked.
Looks like everything is going to work now!
Thanks for the support.
I suggest someone take a note to update the Zoo with this fix, if it's a
bug (I can file a bugzila)
Alexandre
|
|
|
Re: [ATL] Model Copy/Clone [message #91043 is a reply to message #91029] |
Wed, 01 October 2008 22:14 |
Eclipse User |
|
|
|
Originally posted by: freddy.allilaire.univ-nantes.fr
This is a multi-part message in MIME format.
--------------060303060508050000080508
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit
I don't know if it is a bug (maybe an update in ATL metamodel). If you
could open a bugzilla entry, this will be great to track this problem.
Thanks,
Freddy.
Alexandre Torres a
|
|
|
|
Powered by
FUDForum. Page generated in 0.04707 seconds