* @generated
*/
private void addDestroyChildNodesCommand(ICompositeCommand cmd) {
View view = (View) getHost().getModel();
for (Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
Node node = (Node) nit.next();
switch (DispelVisualIDRegistry.getVisualID(node)) {
case BooleanLiteralEditPart.VISUAL_ID:
cmd.add(new DestroyElementCommand(new DestroyElementRequest(
getEditingDomain(), node.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of node as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
break;
case DecimalIntegerLiteralEditPart.VISUAL_ID:
cmd.add(new DestroyElementCommand(new DestroyElementRequest(
getEditingDomain(), node.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of node as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
break;
case DecimalDoubleLiteralEditPart.VISUAL_ID:
cmd.add(new DestroyElementCommand(new DestroyElementRequest(
getEditingDomain(), node.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of node as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
break;
case LocalVariableLocalVariableCompartmentEditPart.VISUAL_ID:
for (Iterator<?> cit = node.getChildren().iterator(); cit
.hasNext();) {
Node cnode = (Node) cit.next();
switch (DispelVisualIDRegistry.getVisualID(cnode)) {
case StringReferenceEditPart.VISUAL_ID:
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 ProcessingElementInstanceEditPart.VISUAL_ID:
cmd.add(new DestroyElementCommand(
new DestroyElementRequest(getEditingDomain(),
cnode.getElement(), false))); // directlyOwned: false
// 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;
}
}