[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Editparts, Figures and children

Pratik Shah wrote:

####
Doesn't matter.  It's still a container.  Containment is defined by ability
to have children.  The constraints on the children are irrelevant.

Agreed. Only to all intents it isn't a container to GEF as it isn't possible to add or remove the children. They are a fixed number, and so to GEF it only has a component role.


####
Okay, I'm not familiar with the xdoclet markup and hence it's not entirely
clear to me what you're trying to do.  But it seems that you have a case
where two distinct model entities are to be shown as having a parent/child
relationship on the screen.  While their relationship may not be as such in
the model, it's perfectly fine to have the BeanEditPart be the parent of the
PropertyEditParts (if that's how you want to represent them).

Yep, I know this. This bit is working fine :-)

To answer your actual question, there's nothing stopping you from overriding
those methods.  If you're not ever going to have children editparts, it
shouldn't create any problems.  However, I wouldn't recommend it; moreso
because it seems you don't need to.  It's easy to end up with some ugly code
if you don't know what you're doing or don't understand the framework
entirely.

That's all I need to know. I was concerned that I shouldn't be adding child figures in the createFigure method, and effectively disabling the GEF from getting them added and removed in add/removeChildVisual(). Just being cautious.


Thanks
Pat