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 A is currently offline Banafsheh AFriend
Messages: 261
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;
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 A is currently offline Banafsheh AFriend
Messages: 261
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;
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: 46
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 A is currently offline Banafsheh AFriend
Messages: 261
Registered: July 2016
Senior Member
Many thanks for your kind help.

[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 A is currently offline Banafsheh AFriend
Messages: 261
Registered: July 2016
Senior Member
Do you know how can I get the name/address of input model (IN1)?

[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: Tue Nov 21 01:03:39 GMT 2017

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

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