Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Move an element(I need to move an element already created to another instance)
Move an element [message #1802256] Tue, 05 February 2019 12:43 Go to next message
Cesar Bernabe is currently offline Cesar BernabeFriend
Messages: 13
Registered: December 2016
Junior Member
Hello,

I'm creating elements that relate two previously created elements. That is, el3 refers to el1 and el2. El3 is created using a lazy rule. The metamodel has a container element that stores all elements of the template. However I can not move the el3 into the container.

I can move el1 and el2 into the container using the following code:
ElementNodes <- E!ENodes.allInstances()


I believe the above code does not work with el3 because it is an element created by a lazy rule.

Any idea how I can solve this?

Tnks.
Re: Move an element [message #1802484 is a reply to message #1802256] Sun, 10 February 2019 16:19 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 581
Registered: September 2012
Location: Belgium
Senior Member

Provided that you used a unique lazy rule (in EMFTVM), you can also track down those generated elements, given the (Sequence of) source elements that generated them, for example:

E!EL1.allInstances()->collect(el1 | E!EL2.allInstances()->collect(el2 | thisModule.resolveTemp(Sequence{el1, el2}, 'LazyRuleName', 'outputElementName') )->flatten()


Cheers,
Dennis
Re: Move an element [message #1803045 is a reply to message #1802484] Thu, 21 February 2019 12:53 Go to previous message
Cesar Bernabe is currently offline Cesar BernabeFriend
Messages: 13
Registered: December 2016
Junior Member
It did work, thank you very much! :)
Previous Topic:Problem to reference to an existing model
Next Topic:Group by name (to created Element)
Goto Forum:
  


Current Time: Sat Nov 11 08:20:02 GMT 2023

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

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

Back to the top