Package org.springframework.ide.eclipse.webflow.ui.graph.commands

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


  /* (non-Javadoc)
   * @see org.eclipse.gef.editpolicies.ConnectionEditPolicy#getDeleteCommand(org.eclipse.gef.requests.GroupRequest)
   */
  protected Command getDeleteCommand(GroupRequest request) {
    if (getHost().getModel() instanceof StateTransition) {
      DeleteStateTransitionCommand cmd = new DeleteStateTransitionCommand();
      StateTransition t = (StateTransition) getHost().getModel();
      cmd.setTransition(t);
      cmd.setSource(t.getFromState());
      cmd.setTarget(t.getToState());
      return cmd;
    }
    else if (getHost().getModel() instanceof IfTransition) {
      IfTransition t = (IfTransition) getHost().getModel();
      if (!t.isThen()) {
        DeleteIfTransitionCommand cmd = new DeleteIfTransitionCommand();
        cmd.setTransition(t);
        cmd.setSource(t.getFromIf());
        cmd.setTarget(t.getToState());
        return cmd;
      }
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.webflow.ui.graph.commands.DeleteStateTransitionCommand

Copyright © 2018 www.massapicom. 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.