[ATL] delete et refining [message #100143] |
Wed, 18 February 2009 05:20  |
Eclipse User |
|
|
|
Hello,
I try to transform one uml metaclass in other uml metaclass, I work with
the ATL 3 on eclipse 3.5
ATL refining mode is it capable to do this transformation, or in
refining mode we can just modify some attribute of existant metaclass,
and also add other metaclass (like atl example in zoo Public to Private
transformation)
And can we delete instances in refining mode ?
thank
|
|
|
Re: [ATL] delete et refining [message #100212 is a reply to message #100143] |
Wed, 18 February 2009 08:15   |
Eclipse User |
|
|
|
Hello,
Answers below:
Laurent SABATIER a écrit :
> Hello,
>
> I try to transform one uml metaclass in other uml metaclass, I work with
> the ATL 3 on eclipse 3.5
>
> ATL refining mode is it capable to do this transformation, or in
> refining mode we can just modify some attribute of existant metaclass,
You can modify existing instances, but also add new elements. For
instance, this rule creates a new Interface next to each Class:
rule Class {
from
input : UML!Class
to
refined : UML!Class (
name <- input.name
),
added : UML!Interface(
package <- input.package,
name <- 'I' + input.name
)
}
> and also add other metaclass (like atl example in zoo Public to Private
> transformation)
Note that there is a more recent version of this example, directly
available in the New->example->atl wizard.
>
> And can we delete instances in refining mode ?
At this time we can't, you'll have to redefine your transformation in
the standard mode to do that.
Best regards,
William
>
> thank
|
|
|
Re: [ATL] delete et refining [message #100225 is a reply to message #100212] |
Wed, 18 February 2009 08:25   |
Eclipse User |
|
|
|
Hello,
My goal is this for example :
rule Class {
from
input : UML!Class
to
refined : UML!Component (
name <- input.name
)
}
William Piers a écrit :
> Hello,
>
> Answers below:
>
> Laurent SABATIER a écrit :
>> Hello,
>>
>> I try to transform one uml metaclass in other uml metaclass, I work
>> with the ATL 3 on eclipse 3.5
>>
>> ATL refining mode is it capable to do this transformation, or in
>> refining mode we can just modify some attribute of existant metaclass,
>
> You can modify existing instances, but also add new elements. For
> instance, this rule creates a new Interface next to each Class:
>
> rule Class {
> from
> input : UML!Class
> to
> refined : UML!Class (
> name <- input.name
> ),
> added : UML!Interface(
> package <- input.package,
> name <- 'I' + input.name
> )
> }
>
>> and also add other metaclass (like atl example in zoo Public to
>> Private transformation)
>
> Note that there is a more recent version of this example, directly
> available in the New->example->atl wizard.
>
>>
>> And can we delete instances in refining mode ?
>
> At this time we can't, you'll have to redefine your transformation in
> the standard mode to do that.
>
> Best regards,
>
> William
>
>>
>> thank
|
|
|
Re: [ATL] delete et refining [message #100238 is a reply to message #100225] |
Wed, 18 February 2009 09:03   |
Eclipse User |
|
|
|
The example you give implies the deletion of the input Class, so it is
not possible with the current refining mode.
Laurent SABATIER a écrit :
> Hello,
>
> My goal is this for example :
>
> rule Class {
> from
> input : UML!Class
> to
> refined : UML!Component (
> name <- input.name
> )
> }
>
>
>
> William Piers a écrit :
>> Hello,
>>
>> Answers below:
>>
>> Laurent SABATIER a écrit :
>>> Hello,
>>>
>>> I try to transform one uml metaclass in other uml metaclass, I work
>>> with the ATL 3 on eclipse 3.5
>>>
>>> ATL refining mode is it capable to do this transformation, or in
>>> refining mode we can just modify some attribute of existant metaclass,
>>
>> You can modify existing instances, but also add new elements. For
>> instance, this rule creates a new Interface next to each Class:
>>
>> rule Class {
>> from
>> input : UML!Class
>> to
>> refined : UML!Class (
>> name <- input.name
>> ),
>> added : UML!Interface(
>> package <- input.package,
>> name <- 'I' + input.name
>> )
>> }
>>
>>> and also add other metaclass (like atl example in zoo Public to
>>> Private transformation)
>>
>> Note that there is a more recent version of this example, directly
>> available in the New->example->atl wizard.
>>
>>>
>>> And can we delete instances in refining mode ?
>>
>> At this time we can't, you'll have to redefine your transformation in
>> the standard mode to do that.
>>
>> Best regards,
>>
>> William
>>
>>>
>>> thank
|
|
|
Re: [ATL] delete et refining [message #100373 is a reply to message #100238] |
Thu, 19 February 2009 10:37  |
Eclipse User |
|
|
|
I think you are better off not using refining mode. Use the default mode
and write a rule for each type you wish to map. I found using the inbuild
autocompletion of ATl to be a big help here when writing such montonous
rules. Just define the metamodel in a comment at the start of your file.
For example
-- @nsURI UML=http://www.eclipse.org/uml2/3.0.0/UML
Cheers,
Ronan
|
|
|
Powered by
FUDForum. Page generated in 0.04131 seconds