Examples of DeleteStatePropertyCommand


Examples of org.springframework.ide.eclipse.webflow.ui.graph.commands.DeleteStatePropertyCommand

     *
     * @return
     */
    protected Command createDeletePropertyCommand(IAttribute child) {
        if (child.getElementParent() instanceof IState) {
            DeleteStatePropertyCommand cmd = new DeleteStatePropertyCommand();
            cmd.setParent((IState) child.getElementParent());
            cmd.setChild(child);
            return cmd;
        }
        else if (child.getElementParent() instanceof IActionElement) {
            DeleteActionPropertyCommand cmd = new DeleteActionPropertyCommand();
            cmd.setParent((IActionElement) child.getElementParent());
            cmd.setChild(child);
            return cmd;
        }
        return null;
    }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.ui.graph.commands.DeleteStatePropertyCommand

  protected Command createDeleteCommand(GroupRequest deleteRequest) {
    if (getHost().getModel() instanceof IAttribute
        && getHost().getParent().getModel() instanceof IAttributeEnabled) {
      IAttributeEnabled parent = (IAttributeEnabled) (getHost()
          .getParent().getModel());
      DeleteStatePropertyCommand deleteCmd = new DeleteStatePropertyCommand();
      deleteCmd.setParent(parent);
      deleteCmd.setChild((IAttribute) (getHost().getModel()));
      return deleteCmd;
    }
    else if (getHost().getModel() instanceof IAttributeMapper
        && getHost().getParent().getModel() instanceof ISubflowState) {
      ISubflowState parent = (ISubflowState) (getHost().getParent()
          .getModel());
      DeleteAttributeMapperCommand deleteCmd = new DeleteAttributeMapperCommand();
      deleteCmd.setParent(parent);
      deleteCmd.setChild((IAttributeMapper) (getHost().getModel()));
      return deleteCmd;
    }
    else if (getHost().getParent().getModel() instanceof IAttributeMapper) {
      // IAttributeMapper parent = (IAttributeMapper)
      // (getHost().getParent()
      // .getModel());
      // DeleteInputOutputCommand deleteCmd = new
      // DeleteInputOutputCommand();
      // deleteCmd.setParent(parent);
      // deleteCmd.setChild(getHost().getModel());
      // return deleteCmd;
    }
    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;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.