}
else if (getHost().getParent().getModel() instanceof IWebflowState
|| getHost().getParent().getModel() instanceof IInlineFlowState) {
IWebflowModelElement parent = (IWebflowModelElement) (getHost()
.getParent().getModel());
DeleteCommand deleteCmd = new DeleteCommand();
deleteCmd.setParent(parent);
deleteCmd.setChild((IState) (getHost().getModel()));
return deleteCmd;
}
else if (getHost().getModel() instanceof IActionElement) {
DeleteActionCommand deleteCmd = new DeleteActionCommand();
deleteCmd.setChild((IActionElement) (getHost().getModel()));
return deleteCmd;
}
else if (getHost().getModel() instanceof IExceptionHandler) {
DeleteExceptionHandlerCommand deleteCmd = new DeleteExceptionHandlerCommand();
deleteCmd.setChild((IExceptionHandler) (getHost().getModel()));
return deleteCmd;
}
else if (getHost().getParent().getModel() instanceof IDecisionState
&& getHost().getModel() instanceof IIf) {
IDecisionState parent = (IDecisionState) (getHost().getParent()
.getModel());
DeleteIfCommand deleteCmd = new DeleteIfCommand();
deleteCmd.setParent(parent);
deleteCmd.setChild((IIf) (getHost().getModel()));
return deleteCmd;
}
return null;
}