Re: [ATL] How to create a new class [message #37577] |
Mon, 14 May 2007 08:48 |
Eclipse User |
|
|
|
Originally posted by: Hugo.Bruneliere.univ-nantes.fr
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.03834 seconds