Examples of IStateTransition


Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

    data1.widthHint = 40;
    addButton.setLayoutData(data1);
    addButton.addSelectionListener(new SelectionAdapter() {

      public void widgetSelected(SelectionEvent e) {
        IStateTransition trans = new StateTransition();
        trans.createNew(parentElement,
            webflowState);
        StateTransitionPropertiesDialog dialog = new StateTransitionPropertiesDialog(
            parentShell, parentElement, trans, true);
        if (dialog.open() == Dialog.OK) {
          transitions.add(trans);
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

      if (state instanceof ITransitionableTo) {
        for (IState s : this.states) {
          if (s instanceof ITransitionableFrom) {
            for (ITransition trans : ((ITransitionableFrom) s).getOutputTransitions()) {
              if (trans instanceof IStateTransition) {
                IStateTransition stateTrans = (IStateTransition) trans;
                if (state.getId().equals(stateTrans.getToStateId())) {
                  if (!((ITransitionableTo) state).getInputTransitions()
                      .contains(trans)) {
                    stateTrans.getFromState().fireStructureChange(OUTPUTS,
                        stateTrans);
                    ((ITransitionableTo) state).addInputTransition(trans);
                  }
                }
              }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

    NodeList children = node.getChildNodes();
    if (children != null && children.getLength() > 0) {
      for (int i = 0; i < children.getLength(); i++) {
        IDOMNode child = (IDOMNode) children.item(i);
        if ("transition".equals(child.getLocalName())) {
          IStateTransition trans = new StateTransition();
          trans.init(child, this);
          this.globalTransition.add(trans);
        }
      }
    }
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

  }

  public void addGlobalTransition(IStateTransition action, int i) {
    if (!this.globalTransition.contains(action)) {
      if (this.globalTransition.size() > i) {
        IStateTransition ref = this.globalTransition.get(i);
        WebflowModelXmlUtils.insertBefore(action.getNode(), ref
            .getNode());
      }
      else {
        WebflowModelXmlUtils.insertNode(action.getNode(), node);
      }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

      NodeList children = node.getChildNodes();
      if (children != null && children.getLength() > 0) {
        for (int i = 0; i < children.getLength(); i++) {
          IDOMNode child = (IDOMNode) children.item(i);
          if ("transition".equals(child.getLocalName())) {
            IStateTransition trans = new StateTransition(
                (IWebflowState) parent);
            trans.init(child, this);
            this.outputTransitions.add(trans);
          }
          else if ("secured".equals(child.getLocalName())) {
            ISecured secured = new Secured();
            secured.init(child, this);
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

    if (a instanceof ITransitionableTo)
      targetConnections.addAll(((ITransitionableTo) a)
          .getInputTransitions());
    for (int i = 0; i < targetConnections.size(); i++) {
      if (targetConnections.get(i) instanceof IStateTransition) {
        IStateTransition t = (IStateTransition) targetConnections
            .get(i);
        t.getFromState().removeOutputTransition(t);
        ((ITransitionableTo) a).removeInputTransition(t);
      }
      else if (targetConnections.get(i) instanceof IfTransition) {
        IfTransition t = (IfTransition) targetConnections.get(i);
        if (t.isThen()) {
          t.getFromIf().removeThenTransition();
        }
        else {
          t.getFromIf().removeElseTransition();
        }
        ((ITransitionableTo) a).removeInputTransition(t);
      }
    }
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

  /**
   *
   */
  private void restoreConnections() {
    for (int i = 0; i < sourceConnections.size(); i++) {
      IStateTransition t = (IStateTransition) sourceConnections.get(i);
      t.getToState().addInputTransition(t);
      t.getFromState().addOutputTransition(t);
    }
    sourceConnections.clear();
    for (int i = 0; i < targetConnections.size(); i++) {
      if (targetConnections.get(i) instanceof IStateTransition) {
        IStateTransition t = (IStateTransition) targetConnections
            .get(i);
        t.getToState().addInputTransition(t);
        t.getFromState().addOutputTransition(t);
      }
      else if (targetConnections.get(i) instanceof IIfTransition) {
        IIfTransition t = (IIfTransition) targetConnections.get(i);
        t.getToState().addInputTransition(t);
        if (t.isThen()) {
          t.getFromIf().setThenTransition(t);
        }
        else {
          t.getFromIf().setElseTransition(t);
        }
      }
    }
    targetConnections.clear();
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

    if (a instanceof ITransitionableTo)
      targetConnections.addAll(((ITransitionableTo) a)
          .getInputTransitions());
    for (int i = 0; i < targetConnections.size(); i++) {
      if (targetConnections.get(i) instanceof IStateTransition) {
        IStateTransition t = (IStateTransition) targetConnections
            .get(i);
        t.setToState(null);
        t.getFromState().fireStructureChange(
            WebflowModelElement.OUTPUTS, t);
      }
      if (targetConnections.get(i) instanceof IIfTransition) {
        IIfTransition t = (IIfTransition) targetConnections.get(i);
        t.setToState(null);
        ((IWebflowModelElement) t.getElementParent()).fireStructureChange(
            WebflowModelElement.OUTPUTS, t);
      }
    }
  }
View Full Code Here

Examples of org.springframework.ide.eclipse.webflow.core.model.IStateTransition

        buf.append(bean.getClassName());
        buf.append(']');
      }
    }
    else if (element instanceof IStateTransition) {
      IStateTransition state = (IStateTransition) element;
      if (state.getToStateId() != null) {
        buf.append("To: " + state.getToStateId());
      }
      if (state.getToStateId() != null) {
        buf.append("\nOn: " + state.getOn());
      }
    }
    else {
      buf.append(super.getText(element));
    }
    if (showAdditionalInfo) {
      if (element instanceof IViewState) {
        IViewState state = (IViewState) element;
        if (state.getView() != null) {
          buf.append("\nView: " + state.getView());
        }
      }
      if (element instanceof ISubflowState) {
        ISubflowState state = (ISubflowState) element;
        if (WebflowModelXmlUtils.isVersion1Flow(state)) {
          if (state.getFlow() != null) {
            buf.append("\nFlow: " + state.getFlow());
          }
        }
        else {
          if (state.getFlow() != null) {
            buf.append("\nSubflow: " + state.getFlow());
          }
        }
      }
      if (element instanceof IEndState) {
        IEndState state = (IEndState) element;
        if (state.getView() != null) {
          buf.append("\nView: " + state.getView());
        }
      }
      if (element instanceof IStateTransition) {
        IStateTransition state = (IStateTransition) element;
        if (state.getOnException() != null) {
          buf.append("\nOn-exception: " + state.getOnException());
        }
      }
    }

    if (showElementType) {
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.