Avoid changing parent to editparts [message #143365] |
Thu, 19 July 2007 02:28 |
Eclipse User |
|
|
|
Originally posted by: rgtejedor07.gmail.com
Hi,
I have an editpart which has another editpart inside (just one child
editpart). The child editpart has a root component editpolicy to avoid
remove it. Also the child editpolicy has the following layout editpolicy:
return new XYLayoutEditPolicy() {
protected LayoutEditPolicy createLayoutEditPolicy() {
return new XYLayoutEditPolicy() {
@Override
protected EditPolicy createChildEditPolicy(EditPart arg0) {
NonResizableEditPolicyEx nre = new NonResizableEditPolicyEx();
return nre;
}
@Override
@SuppressWarnings("unchecked")
protected Command getResizeChildrenCommand( ChangeBoundsRequest request )
{
request.setMoveDelta(new Point(0, 0));
return super.getResizeChildrenCommand(request);
}
};
}
I try to avoid movement and resizing in the child editpart is this the
right way?
The other problem is the parent editPart is also inside another editPart
and I am able to move the child which is inside the second editpart to the
first one. It seems like you are able to change parent to child editpart,
passing the child editpart to other editparts at diferent hierarchy ( you
can pass child to grandparents). How can I avoid this???
I am working with gmf 2.0.
Any ideas would be appreciated.
Regards
|
|
|
Powered by
FUDForum. Page generated in 0.21904 seconds