Hi,
For my development, I need to add on an EditPart an external node with a custom layout edit policy.
The issue is that this edit policy is not taking into account. In fact the parent EditPart installs layout policies for their children(On method createLayoutEditPolicy()). In the case of the external node, it is no verification if a layout policy exists and set a BorderItemSelectionEditPolicy by default:
case ExternalNameEditPart.VISUAL_ID:
return new BorderItemSelectionEditPolicy() {
protected List<?> createSelectionHandles() {
MoveHandle mh = new MoveHandle((GraphicalEditPart)getHost());
mh.setBorder(null);
return Collections.singletonList(mh);
}
};
So I would like to know if there is a reason that it's the parent which manage the layout policy of their children and if it will have side effect if I force to take into account layout policy of children with for example:
EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
if(result == null) {return new BorderItemSelectionEditPolicy...} else return result
thank you.