Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » Re: [ATL Transfromation] How to create a new class
Re: [ATL Transfromation] How to create a new class [message #376946] Thu, 03 May 2007 15:56 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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!
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [ATL Transfromation] How to create a new class [message #377703 is a reply to message #376946] Mon, 14 May 2007 12:43 Go to previous messageGo to next message
Matteo Bordin is currently offline Matteo BordinFriend
Messages: 19
Registered: July 2009
Junior Member
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 #377704 is a reply to message #377703] Mon, 14 May 2007 12:48 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
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/
--------------------------------------------------------


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: [ATL Transfromation] How to create a new class [message #596224 is a reply to message #376946] Mon, 14 May 2007 12:43 Go to previous message
Matteo Bordin is currently offline Matteo BordinFriend
Messages: 19
Registered: July 2009
Junior Member
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 12:48 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
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/
--------------------------------------------------------


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:[MOFScript] objectsOfType
Next Topic:[Epsilon] Error in Running Examples
Goto Forum:
  


Current Time: Sat Apr 20 03:49:00 GMT 2024

Powered by FUDForum. Page generated in 0.02687 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top