How to display the children of a model along with the model [message #236089] |
Thu, 21 June 2007 13:54 |
Eclipse User |
|
|
|
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 #236108 is a reply to message #236089] |
Thu, 21 June 2007 15:28 |
Eclipse User |
|
|
|
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 ?
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03784 seconds