Re: [ATL Transfromation] How to create a new class [message #376946] |
Thu, 03 May 2007 11:56  |
Eclipse User |
|
|
|
Lara,
Please use the GMT newsgroup to ask questions about ATL. I've added it
to the "to" list so there's no need to repost.
Lara wrote:
> Hello,
>
> I´m making a transformation with ATL. My metamodels are uml_1.4.4. I want to
> create a new class in my output model without getting any information from
> the input model, how can I do it?
> Thanks!
>
>
>
|
|
|
|
Re: [ATL] How to create a new class [message #377704 is a reply to message #377703] |
Mon, 14 May 2007 08:48  |
Eclipse User |
|
|
|
Lara & Matteo,
ATL has been recently promoted and is now a core component of the M2M
project. So please use the M2M newsgroup for posts concerning ATL (and
put the [ATL] tag in the subject).
Best regards,
Hugo
Matteo Bordin a écrit :
> Dear Lara,
>
> you can generate multiple model element in the "to" section. If this is
> not possible I usually use this pattern: a called rule creating a model
> element and returning it in the "do" section:
>
> rule createClass(<PARAMETERS>){
> to c : UML!Class
> do{
> --set attributes here
> c;
> }
> }
>
> For example you can invoke the rule in any "do" section (I don't know
> the UML1.4 metamodel precisely, but you should get the idea):
>
> [...]
> package.ownedMember <-
> package.ownedMember->including(thisModule.createClass(<PARAMETERS >));
> [...]
>
> Ed Merks wrote:
>> Lara,
>>
>> Please use the GMT newsgroup to ask questions about ATL. I've added
>> it to the "to" list so there's no need to repost.
>>
>>
>> Lara wrote:
>>> Hello,
>>>
>>> I´m making a transformation with ATL. My metamodels are uml_1.4.4. I
>>> want to create a new class in my output model without getting any
>>> information from the input model, how can I do it?
>>> Thanks!
>>>
>>>
>
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
|
Re: [ATL Transfromation] How to create a new class [message #596224 is a reply to message #376946] |
Mon, 14 May 2007 08:43  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------040006020707040501050508
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Dear Lara,
you can generate multiple model element in the "to" section. If this is
not possible I usually use this pattern: a called rule creating a model
element and returning it in the "do" section:
rule createClass(<PARAMETERS>){
to c : UML!Class
do{
--set attributes here
c;
}
}
For example you can invoke the rule in any "do" section (I don't know
the UML1.4 metamodel precisely, but you should get the idea):
[...]
package.ownedMember <-
package.ownedMember->including(thisModule.createClass(<PARAMETERS >));
[...]
Ed Merks wrote:
> Lara,
>
> Please use the GMT newsgroup to ask questions about ATL. I've added it
> to the "to" list so there's no need to repost.
>
>
> Lara wrote:
>> Hello,
>>
>> I
|
|
|
Re: [ATL] How to create a new class [message #596235 is a reply to message #377703] |
Mon, 14 May 2007 08:48  |
Eclipse User |
|
|
|
Lara & Matteo,
ATL has been recently promoted and is now a core component of the M2M
project. So please use the M2M newsgroup for posts concerning ATL (and
put the [ATL] tag in the subject).
Best regards,
Hugo
Matteo Bordin a écrit :
> Dear Lara,
>
> you can generate multiple model element in the "to" section. If this is
> not possible I usually use this pattern: a called rule creating a model
> element and returning it in the "do" section:
>
> rule createClass(<PARAMETERS>){
> to c : UML!Class
> do{
> --set attributes here
> c;
> }
> }
>
> For example you can invoke the rule in any "do" section (I don't know
> the UML1.4 metamodel precisely, but you should get the idea):
>
> [...]
> package.ownedMember <-
> package.ownedMember->including(thisModule.createClass(<PARAMETERS >));
> [...]
>
> Ed Merks wrote:
>> Lara,
>>
>> Please use the GMT newsgroup to ask questions about ATL. I've added
>> it to the "to" list so there's no need to repost.
>>
>>
>> Lara wrote:
>>> Hello,
>>>
>>> I´m making a transformation with ATL. My metamodels are uml_1.4.4. I
>>> want to create a new class in my output model without getting any
>>> information from the input model, how can I do it?
>>> Thanks!
>>>
>>>
>
--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
|
|
|
Powered by
FUDForum. Page generated in 0.03827 seconds