Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Avoid changing parent to editparts
Avoid changing parent to editparts [message #143365] Thu, 19 July 2007 02:28
Eclipse UserFriend
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
Previous Topic:Filtering Views
Next Topic:Create a new element programmatically when an attribute changes
Goto Forum:
  


Current Time: Fri May 09 08:44:41 EDT 2025

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

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

Back to the top