Package org.springframework.ide.eclipse.webflow.core.internal.model

Examples of org.springframework.ide.eclipse.webflow.core.internal.model.Action


    data1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    data1.widthHint = 120;
    addActionButton.setLayoutData(data1);
    addActionButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        Action action = new Action();
        action.createNew(parentElement);
        action.setType(type);
        if (DialogUtils.openPropertiesDialog(parentElement, action, true) == Dialog.OK) {
          actions.add(action);
          configsViewer.refresh();
        }
      }
    });
    if (WebflowModelXmlUtils.isVersion1Flow(parentElement)) {
      addBeanActionButton = new Button(buttonArea, SWT.PUSH);
      addBeanActionButton.setText("Add Bean Action");
      data1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
      data1.widthHint = 120;
      addBeanActionButton.setLayoutData(data1);
      addBeanActionButton.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          BeanAction action = new BeanAction();
          action.createNew(parentElement);
          action.setType(type);
          if (DialogUtils.openPropertiesDialog(parentElement, action, true) == Dialog.OK) {
            actions.add(action);
            configsViewer.refresh();
          }
        }
      });
    }
    addEvaluationButton = new Button(buttonArea, SWT.PUSH);
    if (WebflowModelXmlUtils.isVersion1Flow(parentElement)) {
      addEvaluationButton.setText("Add Evaluation Action");
    }
    else {
      addEvaluationButton.setText("Add Evaluate");
    }
    data1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    data1.widthHint = 120;
    addEvaluationButton.setLayoutData(data1);
    addEvaluationButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        EvaluateAction action = new EvaluateAction();
        action.createNew(parentElement);
        action.setType(type);
        if (DialogUtils.openPropertiesDialog(parentElement, action, true) == Dialog.OK) {
          actions.add(action);
          configsViewer.refresh();
        }
      }
    });
    addSetButton = new Button(buttonArea, SWT.PUSH);
    addSetButton.setText("Add Set");
    data1 = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    data1.widthHint = 120;
    addSetButton.setLayoutData(data1);
    addSetButton.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        Set action = new Set();
        action.createNew(parentElement);
        action.setType(type);
        if (DialogUtils.openPropertiesDialog(parentElement, action, true) == Dialog.OK) {
          actions.add(action);
          configsViewer.refresh();
        }
      }
View Full Code Here


  private static PaletteContainer createRenderActionsDrawer(boolean version1) {
    List<ToolEntry> entries = new ArrayList<ToolEntry>();

    IRenderActions exit = new RenderActions();
    IAction action = new Action();
    action.setElementParent(exit);

    WebflowModelLabelDecorator dec = new WebflowModelLabelDecorator();

    PaletteDrawer drawer = new PaletteDrawer("Render Actions", null);
    drawer.setInitialState(PaletteDrawer.INITIAL_STATE_OPEN);
View Full Code Here

  private static PaletteContainer createEntryActionDrawer(boolean version1) {
    List<ToolEntry> entries = new ArrayList<ToolEntry>();

    IEntryActions exit = new EntryActions();
    IAction action = new Action();
    action.setElementParent(exit);

    WebflowModelLabelDecorator dec = new WebflowModelLabelDecorator();

    PaletteDrawer drawer = new PaletteDrawer("Entry Actions", null);
    drawer.setInitialState(PaletteDrawer.INITIAL_STATE_CLOSED);
View Full Code Here

  private static PaletteContainer createExitActionDrawer(boolean version1) {
    List<ToolEntry> entries = new ArrayList<ToolEntry>();

    IExitActions exit = new ExitActions();
    IAction action = new Action();
    action.setElementParent(exit);

    WebflowModelLabelDecorator dec = new WebflowModelLabelDecorator();

    PaletteDrawer drawer = new PaletteDrawer("Exit Actions", null);
    drawer.setInitialState(PaletteDrawer.INITIAL_STATE_CLOSED);
View Full Code Here

    StringBuffer buf = new StringBuffer();
    if (element instanceof IState) {
      buf.append(((IState) element).getId());
    }
    else if (element instanceof Action) {
      Action action = (Action) element;
      if (WebflowModelXmlUtils.isVersion1Flow(action)) {
        if (action.getName() != null) {
          buf.append(action.getName());
          buf.append(": ");
        }
        if (action.getBean() != null) {
          buf.append(action.getBean());
        }
        if (action.getMethod() != null) {
          buf.append(".");
          buf.append(action.getMethod());
          if (action.getMethod().lastIndexOf("(") == -1) {
            buf.append("()");
          }
        }
      }
      else {
        buf.append("fragments: ").append(action.getName());
      }
    }
    else if (element instanceof BeanAction) {
      BeanAction action = (BeanAction) element;
      if (action.getName() != null) {
        buf.append(action.getName());
        buf.append(": ");
      }
      if (action.getBean() != null) {
        buf.append(action.getBean());
      }
      if (action.getMethod() != null) {
        buf.append(".");
        buf.append(action.getMethod());
        if (action.getMethod().lastIndexOf("(") == -1) {
          buf.append("()");
        }
      }
    }
    else if (element instanceof IEvaluateAction) {
      IEvaluateAction action = (IEvaluateAction) element;
      if (action.getName() != null) {
        buf.append(action.getName());
        buf.append(": ");
      }
      if (action.getExpression() != null) {
        buf.append(action.getExpression());
      }
    }
    else if (element instanceof ISet) {
      ISet action = (ISet) element;
      if (action.getAttribute() != null) {
        buf.append(action.getAttribute());
        buf.append(" = ");
      }
      if (action.getValue() != null) {
        buf.append(action.getValue());
      }
    }
    else if (element instanceof IExceptionHandler) {
      IExceptionHandler action = (IExceptionHandler) element;
      if (action.getBean() != null) {
        buf.append(action.getBean());
      }
    }
    else if (element instanceof IAttributeMapper) {
      IAttributeMapper attributeMapper = (IAttributeMapper) element;
      if (attributeMapper.getBean() != null) {
View Full Code Here

      Object flowModelElement = getFirstSelectedEditPart().getModel();
      String beanId = null;
      IWebflowConfig config = WebflowUtils.getActiveWebflowConfig();
      if (config != null && config.getBeansConfigs() != null && config.getBeansConfigs().size() > 0) {
        if (flowModelElement instanceof Action) {
          Action action = (Action) flowModelElement;
          beanId = action.getBean();
        }
        else if (flowModelElement instanceof BeanAction) {
          BeanAction action = (BeanAction) flowModelElement;
          beanId = action.getBean();
        }
        else if (flowModelElement instanceof ExceptionHandler) {
          ExceptionHandler action = (ExceptionHandler) flowModelElement;
          beanId = action.getBean();
        }
        else if (flowModelElement instanceof AttributeMapper) {
          AttributeMapper action = (AttributeMapper) flowModelElement;
          beanId = action.getBean();
        }
      }
      if (beanId != null) {
        Set<IModelElement> configs = config.getBeansConfigs();
        for (IModelElement bc : configs) {
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.webflow.core.internal.model.Action

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.