Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Issue of Parent child Realtionship
Issue of Parent child Realtionship [message #210362] Mon, 27 February 2006 07:58 Go to next message
Eclipse UserFriend
Originally posted by: gaurav.bagga.zensar.com

There is a parent , that has got only one child .
And that child has got many childrens.
The return type of getModelChildren() is List. But the return type in the
model is the object of the child itself i.e. getTree() which returns Tree,
not EList Type.

What i have done in create command i have created an object of
EObjectContainmentList() and provided the values, but this also doesnt
works.

How to go about it?

Thanks
Gaurav
Re: Issue of Parent child Realtionship [message #210567 is a reply to message #210362] Wed, 01 March 2006 17:51 Go to previous message
Steven R. Shaw is currently offline Steven R. ShawFriend
Messages: 128
Registered: July 2009
Senior Member
This all depends how you visualize your model. If you visualize the "Tree"
as a single item, then it would be contained as single item in the List .
Otherwise, you would need to consolidate or wrap your model to conform to
the GEF api.

There are number of examples of the getModelChildren api implementation:
org.eclipse.gef.examples.ediagram.outline#ClassifierTreeEdit Part
org.eclipse.gef.internal.ui.palette.editparts#PaletteEditPar t

-Steve

"Gaurav B" <gaurav.bagga@zensar.com> wrote in message
news:77e695bfb12c00965bb639a1a5725a2f$1@www.eclipse.org...
>
> There is a parent , that has got only one child .
> And that child has got many childrens.
> The return type of getModelChildren() is List. But the return type in the
> model is the object of the child itself i.e. getTree() which returns Tree,
> not EList Type.
>
> What i have done in create command i have created an object of
> EObjectContainmentList() and provided the values, but this also doesnt
> works.
>
> How to go about it?
>
> Thanks
> Gaurav
>
Previous Topic:how to Identify the model present on the editor ?
Next Topic:Problem to draw a vertical Label
Goto Forum:
  


Current Time: Fri Apr 26 17:04:06 GMT 2024

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

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

Back to the top