protected Command createAddCommand(Request request, EditPart childEditPart,
Object constraint) {
LogicSubpart part = (LogicSubpart)childEditPart.getModel();
Rectangle rect = (Rectangle)constraint;
AddCommand add = new AddCommand();
add.setParent((LogicDiagram)getHost().getModel());
add.setChild(part);
add.setLabel(LogicMessages.LogicXYLayoutEditPolicy_AddCommandLabelText);
add.setDebugLabel("LogicXYEP add subpart");//$NON-NLS-1$
SetConstraintCommand setConstraint = new SetConstraintCommand();
setConstraint.setLocation(rect);
setConstraint.setPart(part);
setConstraint.setLabel(LogicMessages.LogicXYLayoutEditPolicy_AddCommandLabelText);
setConstraint.setDebugLabel("LogicXYEP setConstraint");//$NON-NLS-1$
Command cmd = add.chain(setConstraint);
cmd = chainGuideAttachmentCommand(request, part, cmd, true);
cmd = chainGuideAttachmentCommand(request, part, cmd, false);
cmd = chainGuideDetachmentCommand(request, part, cmd, true);
return chainGuideDetachmentCommand(request, part, cmd, false);
}