List parts = request.getEditParts();
CompoundCommand result =
new CompoundCommand("MyContainerEditPolicy_OrphanCommandLabelText");
for (int i = 0; i < parts.size(); i++) {
OrphanChildCommand orphan = new OrphanChildCommand();
orphan.setChild((NodeModel)((EditPart)parts.get(i)).getModel());
orphan.setParent((CompoundModel)getHost().getModel());
result.add(orphan);
}
return result.unwrap();
}