protected Command createAddCommand(
      ChangeBoundsRequest request, EditPart child, Object constraint) {
    LogicSubpart part = (LogicSubpart) child.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);
  }