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

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:

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?


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: 372
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.

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

Current Time: Wed Sep 19 18:33:24 GMT 2018

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

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

Back to the top