Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Nested Objects to list Object..
Nested Objects to list Object.. [message #422698] Sun, 14 September 2008 00:22 Go to next message
Suresh Subramanian is currently offline Suresh SubramanianFriend
Messages: 61
Registered: July 2009
Member
Hi,

My model have the nested model elements. Is that possible to compute all the
child element. For example

if i have

object A contains B and C,
B contains D and E ,
C contains F and G

if all the above objects of same type,
if my current node is A i should get B,C,D,E,F,G
if my current mode is B i should get D and E
if my current mode is C then i should get F and G in a list. Is there api
available for this?.

Regards,
Suresh Subramanian
Re: Nested Objects to list Object.. [message #422700 is a reply to message #422698] Sun, 14 September 2008 01:13 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.zeligsoft.com

Hi, Suresh,

The EObject.eAllContents() method gives you an iterator over exactly the
elements that you need. It's an iterator, not a list, but that should
be OK.

Cheers,

Christian

Suresh Subramanian wrote:
> Hi,
>
> My model have the nested model elements. Is that possible to compute all the
> child element. For example
>
> if i have
>
> object A contains B and C,
> B contains D and E ,
> C contains F and G
>
> if all the above objects of same type,
> if my current node is A i should get B,C,D,E,F,G
> if my current mode is B i should get D and E
> if my current mode is C then i should get F and G in a list. Is there api
> available for this?.
>
> Regards,
> Suresh Subramanian
>
>
>
Previous Topic:Read-only PropertySheetPage in some Views
Next Topic:Adding a plain string to an AnyType FeatureMap (for Ed Merks)
Goto Forum:
  


Current Time: Sun Jan 19 04:52:30 GMT 2020

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

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

Back to the top