Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to display the children of a model along with the model
How to display the children of a model along with the model [message #236089] Thu, 21 June 2007 13:54 Go to next message
Eclipse UserFriend
Originally posted by: suvajit.blr.interrasystems.com

Hi All,

My diagram model consists of 4 different classes :
1. module
2. module has a list of ports (in1,in2,out1,out2)
3. module has a list of child modules (c1,c2)
3. module has a list of connections between child modules and also
between child modules and parent module (1,2,3,4,5,6)

Something like this :
top
+------------------------------+
in1| 1 +------+ 3 +-------+ 5 | out1
--|---| |-------| |---|--
--|---| c1 |-------| c2 |---|--
in2| 2 +------+ 4 +-------+ 6 | out2
+------------------------------+

Now my model.getChildren() returns the reference of the top module and
child modules.

I have placed proper EditParts for each model classes.
But while displaying it on the viewer only the top module is getting
displayed.

Any clue where I have gone wrong ?



--
Regards,
Suvajit
http://flickr.com/photos/jeet_sen
Re: How to display the children of a model along with the model [message #236096 is a reply to message #236089] Thu, 21 June 2007 14:45 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

Child modules figures should be children of the top module figure. Check
if this is the case.
Hope this helps.

Cheers,
Alex
Re: How to display the children of a model along with the model [message #236108 is a reply to message #236089] Thu, 21 June 2007 15:28 Go to previous message
Eclipse UserFriend
Originally posted by: alexandre.magillem.com

Hi,
have you overriden the getModelChildren() in your editparts ?

It should be something like :

@Override
protected List getModelChildren() {
return ((YourModel)getModel()).getChildren();
}

Hope this helps.
Christophe




Suvajit Sengupta a écrit :
> Hi All,
>
> My diagram model consists of 4 different classes :
> 1. module
> 2. module has a list of ports (in1,in2,out1,out2)
> 3. module has a list of child modules (c1,c2)
> 3. module has a list of connections between child modules and also
> between child modules and parent module (1,2,3,4,5,6)
>
> Something like this :
> top
> +------------------------------+
> in1| 1 +------+ 3 +-------+ 5 | out1
> --|---| |-------| |---|--
> --|---| c1 |-------| c2 |---|--
> in2| 2 +------+ 4 +-------+ 6 | out2
> +------------------------------+
>
> Now my model.getChildren() returns the reference of the top module and
> child modules.
>
> I have placed proper EditParts for each model classes.
> But while displaying it on the viewer only the top module is getting
> displayed.
>
> Any clue where I have gone wrong ?
>
>
>
Previous Topic:Cannot instantiate the type TemplateTransferDropTargetListener
Next Topic:Creating a PopUpFigure by clicking on mouse
Goto Forum:
  


Current Time: Tue Aug 09 10:16:56 GMT 2022

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

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

Back to the top