Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsMerging fragments
https://www.eclipse.org/forums/index.php/mv/msg/170906/543267/#msg_543267
I'm having trouble merging model fragments together.
@greedy
rule MergeFragments
merge l : Source!ContextRootNode
with r : Source!FMNode
into t : Target!Feature {
t.name := l.child.name;
t.child := l.child.child;
}
The models are fragments of an overall model that must be combined. In the first fragment is the FMNode or Feature A.
In the second fragment are the features B and C. The context node holds information of where the models should be joined. and says the second fragment of B and C should be made the children of feature A.
This would result in the a model that looked like A->B->C.
I'm not really sure how to assign the children to become the children of the new feature in t or is there some way to just copy r and all its current children and just add in the new features.
Thanks,
Ferg
]]>Ferghal Smyth2010-06-28T21:28:02-00:00Re: Merging fragments
https://www.eclipse.org/forums/index.php/mv/msg/170906/543531/#msg_543531
I'm not sure I fully understand your question. Could you please put together a zip containing the metamodels, sample input models and the expected composed model and send it to me at dskolovos gmail com so that I can have a closer look at this?
Cheers,
Dimitris]]>Dimitris Kolovos2010-06-29T17:21:21-00:00Re: Merging fragments
https://www.eclipse.org/forums/index.php/mv/msg/170906/590431/#msg_590431
I'm not sure I fully understand your question. Could you please put together a zip containing the metamodels, sample input models and the expected composed model and send it to me at dskolovos gmail com so that I can have a closer look at this?