* @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 (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
.getVisualID(node)) {
case eu.admire.visual.pmml._40.diagram.edit.parts.DataDictionaryTypeDataFieldCompartmentEditPart.VISUAL_ID:
for (Iterator cit = node.getChildren().iterator(); cit
.hasNext();) {
Node cnode = (Node) cit.next();
switch (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
.getVisualID(cnode)) {
case eu.admire.visual.pmml._40.diagram.edit.parts.DataFieldTypeEditPart.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;
}
}
break;
case eu.admire.visual.pmml._40.diagram.edit.parts.DataDictionaryTypeTaxonomyCompartmentEditPart.VISUAL_ID:
for (Iterator cit = node.getChildren().iterator(); cit
.hasNext();) {
Node cnode = (Node) cit.next();
switch (eu.admire.visual.pmml._40.diagram.part.PMMLVisualIDRegistry
.getVisualID(cnode)) {
case eu.admire.visual.pmml._40.diagram.edit.parts.TaxonomyTypeEditPart.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;
}
}