Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Creating N copies of a model element and keeping references intact
[ATL] Creating N copies of a model element and keeping references intact [message #498292] Mon, 16 November 2009 11:54
Marcel  is currently offline Marcel Friend
Messages: 54
Registered: July 2009
Consider the following metamodel:
The fact that C can be contained in both A and B is irrelevant for the question. Assume all C's are contained in B's.

I want to create multiple copies of B's.
When an element B is copied (with lazy rule copyB), all contained D's should be copied as well (with lazy rule copyD).
All contained C's should be copied as well (with unique lazy rule copyC).
Rule copyC is unique because it needs to be called twice, once from copyB to get the containment right and once from copyD to get the reference right.
The reference of the copied D should refer to the copied C.

This works fine with one copy.
For two (or more) copies of element B, this goes wrong.
The contained C's are copied only once.
This makes sense, since copyC is a unique lazy rule that is called with the same source model element.

This is not what I want.
Also the C's should be copied multiple times and the references to D should remain intact.

Does anybody have a suggestion on how to solve this?
Previous Topic:[QVT] Library as a plugin
Next Topic:[QVTo] Execute .qvto transformations from MWE
Goto Forum:

Current Time: Sat May 30 22:27:37 GMT 2020

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

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

Back to the top