difference between "eContents" and "eAllContents" [message #1739285] |
Fri, 29 July 2016 07:06  |
Eclipse User |
|
|
|
Hi,
I looked at the documentation but still wondering how "EObject.eContents()" and "EObject.eAllContents()" compare.
I analyzed a random EObject instance and "EObject.eContents()" return something when "EObject.eAllContents()" returns nothing.
Thanks.
[Updated on: Fri, 29 July 2016 07:07] by Moderator
|
|
|
|
|
Re: difference between "eContents" and "eAllContents" [message #1739745 is a reply to message #1739285] |
Fri, 29 July 2016 08:03  |
Eclipse User |
|
|
|
Comments below.
On 29.07.2016 13:06, aurel pestell wrote:
> Hi,
>
> I looked at the documentation but still wondering how
> "EObject.eContents()" and "EObject.eAllContents()" compare.
> I looked in a random EObject and "EObject.eContents()" return
> something when "EObject.eAllContents()" returns nothing.
Well, one returns a list and the other an iterator so I'm not sure you
how concluded "nothingness" in either case because in both cases a
non-null value is definite returned. The eAllContents is basically an
iterator over the containment tree, so it will most definitely return
all the objects that are in eContents, but in addition to that, each
subtree's eContents is visited recursively.
>
> Thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.02801 seconds