Examples of IActionElement


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

  }

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

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

   * @param action
   */
  public void addAction(IActionElement action, int i) {
    if (!this.actions.contains(action)) {
      if (this.actions.size() > i) {
        IActionElement ref = this.actions.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.IActionElement

  }

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

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

     * (non-Javadoc)
     *
     * @see org.eclipse.gef.requests.SimpleFactory#getNewObject()
     */
    public Object getNewObject() {
      IActionElement action = (IActionElement) super.getNewObject();
      action.setType(this.type);
      return action;
    }
View Full Code Here

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

    List parts = request.getEditParts();
    CompoundCommand result = new CompoundCommand();
    for (int i = 0; i < parts.size(); i++) {
      EditPart part = (EditPart) parts.get(i);
      if (part.getModel() instanceof IActionElement) {
        IActionElement ae = (IActionElement) part.getModel();
        IState state = (IState) getHost().getModel();
        if ((ae.getType() == IActionElement.ACTION_TYPE.ACTION && state instanceof IActionState)
            || (ae.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION && state instanceof IViewState)
            || (ae.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION && state instanceof IState)
            || (ae.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION && state instanceof ITransitionableFrom)) {
          ActionCloneCommand orphan = new ActionCloneCommand();
          orphan.setChild((IActionElement) ((EditPart) parts.get(i))
              .getModel());
          orphan.setNewState((IWebflowModelElement) getHost()
              .getModel());
View Full Code Here

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

  /**
   * @param child
   * @return
   */
  protected Command createAddActionCommand(EditPart child) {
    IActionElement activity = (IActionElement) child.getModel();
    AddActionCommand add = new AddActionCommand();
    add.setParent((IWebflowModelElement) getHost().getModel());
    add.setChild(activity);
    return add;
  }
View Full Code Here

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

    List editParts = request.getEditParts();
    CompoundCommand command = new CompoundCommand();
    for (int i = 0; i < editParts.size(); i++) {
      EditPart child = (EditPart) editParts.get(i);
      if (child.getModel() instanceof IActionElement) {
        IActionElement ae = (IActionElement) child.getModel();
        IState state = (IState) getHost().getModel();
        if ((ae.getType() == IActionElement.ACTION_TYPE.ACTION && state instanceof IActionState)
            || (ae.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION && state instanceof IViewState)
            || (ae.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION && state instanceof IState)
            || (ae.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION && state instanceof ITransitionableFrom)) {
          command.add(createAddActionCommand(child));
        }
      }
      else if (child.getModel() instanceof IExceptionHandler) {
        IState state = (IState) getHost().getModel();
View Full Code Here

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

      command.setChild((IState) request.getNewObject());
      return command;
    }
    else if (getHost().getModel() instanceof IState
        && request.getNewObject() instanceof IActionElement) {
      IActionElement ae = (IActionElement) request.getNewObject();
      IState state = (IState) getHost().getModel();
      if ((ae.getType() == IActionElement.ACTION_TYPE.ACTION && state instanceof IActionState)
          || (ae.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION && state instanceof IViewState)
          || (ae.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION && state instanceof IState)
          || (ae.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION && state instanceof ITransitionableFrom)) {
        CreateActionCommand command = new CreateActionCommand();
        command.setParent((IState) getHost().getModel());
        command.setChild((IActionElement) request.getNewObject());
        return command;
      }
View Full Code Here

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

            if (isAncestor(child, getHost()))
                command.add(UnexecutableCommand.INSTANCE);
            else {
                if (child.getModel() instanceof IActionElement
                        && getHost().getModel() instanceof IActionState) {
                    IActionElement childModel = (IActionElement) child.getModel();
                    command.add(createDeleteActionCommand(childModel));
                    command.add(createCreateActionCommand(childModel, index));//$NON-NLS-1$
                }
                else if (child.getModel() instanceof IAttributeMapper
                        && getHost().getModel() instanceof ISubflowState) {
View Full Code Here

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

        return cmd;
      }
    }
    else if (((CreateRequest) request).getNewObject() instanceof IActionElement
        && getHost().getModel() instanceof IStateTransition) {
      IActionElement action = (IActionElement) ((CreateRequest) request)
          .getNewObject();
      if (action.getType() == IActionElement.ACTION_TYPE.ACTION) {
        AddTransitionActionCommand cmd = new AddTransitionActionCommand();
        cmd.setTransition(((IStateTransition) getHost().getModel()));
        cmd.setNewAction(((IActionElement) ((CreateRequest) request)
            .getNewObject()));
        return cmd;
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.