Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsEpsilon getAllChildren or getAllContents for EMF based models
https://www.eclipse.org/forums/index.php/mv/msg/855628/1471980/#msg_1471980
In your Epsilon based scripts/transformations you can't directly work with EMF API dealing with TreeIterators, so that calling eAllContents() or using the EmfTool.getEcoreUtil().getAllContents() will always return you an empty collection.
However after some discussion Dimitris, who pointed out that eContents() indeed return the list of first deep children, you can combine it with a closure operation to simulate the eAllContents operation. The expression would be the following
Just sharing, in case somebody else needed the same handy operation.
[NB this is a kind of solution for EMF based models. I think that this should be part of the language as model element built-in operation. Similar with getContents() or getContainer(). Enhancement request ? ]
Cheers,
Adolfo.]]>Adolfo Sanchez-Barbudo Herrera2014-11-13T13:49:51-00:00Re: Epsilon getAllChildren or getAllContents for EMF based models
https://www.eclipse.org/forums/index.php/mv/msg/855628/1471994/#msg_1471994
Thanks for sharing this. I've created a how-to page in the wiki and added this tip there [1]. By all means please feel free to file an enhancement request for this.