Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Access the metamodel name and address through code
Access the metamodel name and address through code [message #1752554] Wed, 25 January 2017 06:38 Go to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
How can I get input metamodel name and address from the code below (IN1)?

create OUT : MM_Out from IN1 : IN_MM, IN2 : IN_MM2;


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: Access the metamodel name and address through code [message #1754427 is a reply to message #1752554] Fri, 17 February 2017 16:25 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
I tried to get the name of input meta-model via inpattern element of transformation rule. But when I write the below code I have an error. How should I correct the helper?
helper def : IMName : String =
MM!TranformationRule -> first().source.resolvedType.elementName;


Member of MDSE Research Group
http://mdse.ui.ac.ir
Re: Access the metamodel name and address through code [message #1754428 is a reply to message #1754427] Fri, 17 February 2017 16:58 Go to previous messageGo to next message
louis andia. is currently offline louis andia.Friend
Messages: 47
Registered: November 2016
Member
You don't have MM in your header (create OUT : MM_Out from IN1 : IN_MM, IN2 : IN_MM2;).
MM!TranformationRule in not a collection, you probably wanted MM!TranformationRule.allInstances().

Re: Access the metamodel name and address through code [message #1754430 is a reply to message #1754428] Fri, 17 February 2017 17:16 Go to previous messageGo to next message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Many thanks for your kind help.

Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Fri, 17 February 2017 17:38]

Report message to a moderator

Re: Access the metamodel name and address through code [message #1754443 is a reply to message #1754430] Fri, 17 February 2017 20:56 Go to previous message
Banafsheh Azizi is currently offline Banafsheh AziziFriend
Messages: 328
Registered: July 2016
Senior Member
Do you know how can I get the name/address of input model (IN1)?

Member of MDSE Research Group
http://mdse.ui.ac.ir

[Updated on: Fri, 17 February 2017 20:57]

Report message to a moderator

Previous Topic:error in ATL transformation
Next Topic:RPAREN error
Goto Forum:
  


Current Time: Fri Mar 29 08:14:37 GMT 2024

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

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

Back to the top