if (Fd2VisualIDRegistry.getVisualID(outgoingLink) == OneManyRelationTargetFeatureNodesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(
outgoingLink.getSource().getElement(),
null, outgoingLink.getTarget()
.getElement(), false);
cmd.add(new DestroyReferenceCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(),
outgoingLink));
continue;
}
}
cmd.add(new DestroyElementCommand(
new DestroyElementRequest(getEditingDomain(),
cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case CaseOrRelationEditPart.VISUAL_ID:
for (Iterator it = cnode.getSourceEdges().iterator(); it
.hasNext();) {
Edge outgoingLink = (Edge) it.next();
if (Fd2VisualIDRegistry.getVisualID(outgoingLink) == OneManyRelationTargetFeatureNodesEditPart.VISUAL_ID) {
DestroyReferenceRequest r = new DestroyReferenceRequest(
outgoingLink.getSource().getElement(),
null, outgoingLink.getTarget()
.getElement(), false);
cmd.add(new DestroyReferenceCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(),
outgoingLink));
continue;
}
}