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 = view.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;
}
}
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation == null) {
// there are indirectly referenced children, need extra commands: false
addDestroyShortcutsCommand(cmd, view);
// delete host element
cmd.add(new DestroyElementCommand(req));
} else {
cmd.add(new DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}