Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Epsilon/HowTo"
< Epsilon
Line 1: | Line 1: | ||
Quick solutions to common questions related to Epsilon. | Quick solutions to common questions related to Epsilon. | ||
− | + | __FORCETOC__ | |
=== How do I get all children of a model element? === | === How do I get all children of a model element? === | ||
Epsilon does not provide a built-in method for this but you can use EObject's eContents() method if you're working with EMF. To get all descendants of an element, something like the following should do the trick: o.asSequence().closure(x | x.eContents()) | Epsilon does not provide a built-in method for this but you can use EObject's eContents() method if you're working with EMF. To get all descendants of an element, something like the following should do the trick: o.asSequence().closure(x | x.eContents()) |
Revision as of 09:45, 13 November 2014
Quick solutions to common questions related to Epsilon.
How do I get all children of a model element?
Epsilon does not provide a built-in method for this but you can use EObject's eContents() method if you're working with EMF. To get all descendants of an element, something like the following should do the trick: o.asSequence().closure(x | x.eContents())