@Override
protected Command createDeleteCommand(GroupRequest deleteRequest) {
Object child = getHost().getModel();
if (child instanceof DiagramNodeModel) {
DiagramNodeModel nodeModel = (DiagramNodeModel)child;
return new DeleteNodeCommand(nodeModel.getNodePresentation());
}
return super.createDeleteCommand(deleteRequest);
}