if (DispelVisualIDRegistry
.getVisualID(incomingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(),
incomingLink));
continue;
}
}
for (Iterator<?> it = cnode.getSourceEdges().iterator(); it
.hasNext();) {
Edge outgoingLink = (Edge) it.next();
if (DispelVisualIDRegistry
.getVisualID(outgoingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(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;
}
}
break;
case ProcessingElementInstanceOutputsCompartmentEditPart.VISUAL_ID:
for (Iterator<?> cit = node.getChildren().iterator(); cit
.hasNext();) {
Node cnode = (Node) cit.next();
switch (DispelVisualIDRegistry.getVisualID(cnode)) {
case OutputEditPart.VISUAL_ID:
for (Iterator<?> it = cnode.getTargetEdges().iterator(); it
.hasNext();) {
Edge incomingLink = (Edge) it.next();
if (DispelVisualIDRegistry
.getVisualID(incomingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
incomingLink.getElement(), false);
cmd.add(new DestroyElementCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(),
incomingLink));
continue;
}
}
for (Iterator<?> it = cnode.getSourceEdges().iterator(); it
.hasNext();) {
Edge outgoingLink = (Edge) it.next();
if (DispelVisualIDRegistry
.getVisualID(outgoingLink) == ConnectionExpressionEditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(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;
}
}
break;
case ProcessingElementInstanceDefinitionCompartmentEditPart.VISUAL_ID:
for (Iterator<?> cit = node.getChildren().iterator(); cit
.hasNext();) {
Node cnode = (Node) cit.next();
switch (DispelVisualIDRegistry.getVisualID(cnode)) {
case ProcessingElementMethodDefinitionEditPart.VISUAL_ID:
for (Iterator<?> it = cnode.getSourceEdges().iterator(); it
.hasNext();) {
Edge outgoingLink = (Edge) it.next();
if (DispelVisualIDRegistry
.getVisualID(outgoingLink) == MethodCall2EditPart.VISUAL_ID) {
DestroyElementRequest r = new DestroyElementRequest(
outgoingLink.getElement(), false);
cmd.add(new DestroyElementCommand(r));
cmd.add(new DeleteCommand(getEditingDomain(),
outgoingLink));
continue;
}
}
cmd.add(new DestroyElementCommand(