Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Create a copy of an output-pattern-element
Create a copy of an output-pattern-element [message #1695713] Mon, 18 May 2015 14:22 Go to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hi,

I have a tricky problem here. I need a COPY of some elements, which are created in an output-pattern, in a matched rule.

The scenario is as following:

https://dl.dropboxusercontent.com/u/18688378/eclipseCoding/ATL/copy_of_output_element.JPG

1. I create the body of ClassA in a matched rule

2. Now I filter ClassC with a guard (hasSuperClass), so it doesn't enters the matchedRule where ClassA is mapped. For ClassC I have an other matchedRule, where I can access the genrerated-method of ClassB via thisModule.resoveTem().

3. Now I would like to copy, the allready create method of ClassA to ClassC.

Is this possible or do I use ATL in a wrong way?

~Alex

Re: Create a copy of an output-pattern-element [message #1695827 is a reply to message #1695713] Tue, 19 May 2015 14:44 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

You cannot copy output elements in ATL. Better use rule inheritance with an abstract rule to specify the common output pattern for ClassA and ClassC, with specific sub-rules for ClassA and ClassC.

Cheers,
Dennis
Previous Topic:Print ATL console output to file from Java
Next Topic:Generating random values, etc.
Goto Forum:
  


Current Time: Fri Apr 26 06:23:15 GMT 2024

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

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

Back to the top