Package com.eviware.soapui.support.action

Examples of com.eviware.soapui.support.action.SoapUIActionMapping


      SwingActionDelegate actionDelegate = ( SwingActionDelegate )action;
      if( actionDelegate == null )
        continue;

      SoapUIActionMapping mapping = actionDelegate.getMapping();
      if( filePath.equals( mapping.getParam() ) )
      {
        recentProjectsMenu.remove( c );
        break;
      }
    }
View Full Code Here


      SwingActionDelegate actionDelegate = ( SwingActionDelegate )action;
      if( actionDelegate == null )
        continue;

      SoapUIActionMapping mapping = actionDelegate.getMapping();
      if( filePath.equals( mapping.getParam() ) )
      {
        recentWorkspacesMenu.remove( c );
        break;
      }
    }
View Full Code Here

  {
    boolean prevWasSeparator = false;
    SoapUIActionMappingList actionMappings = actionGroup.getActionMappings( null );
    for( int c = 0; c < actionMappings.size(); c++ )
    {
      SoapUIActionMapping mapping = ( SoapUIActionMapping )actionMappings.get( c );
      if( mapping == null )
        continue;

      SoapUIAction action = mapping.getAction();

      if( action instanceof SeperatorAction )
      {
        if( !prevWasSeparator )
        {
          actions.addAction( ActionSupport.SEPARATOR_ACTION );
        }
        prevWasSeparator = true;
      }
      else if( action instanceof SoapUIActionGroupAction )
      {
        DefaultActionList subActions = new DefaultActionList( mapping.getName() );
        SoapUIActionGroup subGroup = ( ( SoapUIActionGroupAction )action ).getActionGroup();
        addMultiActions( modelItems, subActions, subGroup );
        ActionSupport.ActionListAction actionListAction = new ActionSupport.ActionListAction( subActions );
        actions.addAction( actionListAction );
        actionListAction.setEnabled( mapping.isEnabled() );
        prevWasSeparator = false;
      }
      else if( action instanceof SoapUIMultiAction )
      {
        List<ModelItem> targets = new ArrayList<ModelItem>();
        for( ModelItem target : modelItems )
        {
          if( action.applies( target ) )
          {
            targets.add( target );
          }
        }

        if( targets.size() > 0 )
        {
          SwingMultiActionDelegate actionDelegate = new SwingMultiActionDelegate( mapping, modelItems );
          actions.addAction( actionDelegate );
          if( mapping.isDefault() )
            actions.setDefaultAction( actionDelegate );

          actionDelegate.setEnabled( mapping.isEnabled() );
          prevWasSeparator = false;
        }
      }
    }
  }
View Full Code Here

            SwingActionDelegate actionDelegate = (SwingActionDelegate) action;
            if (actionDelegate == null) {
                continue;
            }

            SoapUIActionMapping mapping = actionDelegate.getMapping();
            if (filePath.equals(mapping.getParam())) {
                recentProjectsMenu.remove(c);
                break;
            }
        }
View Full Code Here

            SwingActionDelegate actionDelegate = (SwingActionDelegate) action;
            if (actionDelegate == null) {
                continue;
            }

            SoapUIActionMapping mapping = actionDelegate.getMapping();
            if (filePath.equals(mapping.getParam())) {
                recentWorkspacesMenu.remove(c);
                break;
            }
        }
View Full Code Here

    @SuppressWarnings({"unchecked"})
    protected static void addMultiActions(ModelItem[] modelItems, ActionList actions, SoapUIActionGroup actionGroup) {
        boolean prevWasSeparator = false;
        SoapUIActionMappingList actionMappings = actionGroup.getActionMappings(null);
        for (int c = 0; c < actionMappings.size(); c++) {
            SoapUIActionMapping mapping = (SoapUIActionMapping) actionMappings.get(c);
            if (mapping == null) {
                continue;
            }

            SoapUIAction action = mapping.getAction();

            if (action instanceof SeperatorAction) {
                if (!prevWasSeparator) {
                    actions.addAction(ActionSupport.SEPARATOR_ACTION);
                }
                prevWasSeparator = true;
            } else if (action instanceof SoapUIActionGroupAction) {
                DefaultActionList subActions = new DefaultActionList(mapping.getName());
                SoapUIActionGroup subGroup = ((SoapUIActionGroupAction) action).getActionGroup();
                addMultiActions(modelItems, subActions, subGroup);
                ActionSupport.ActionListAction actionListAction = new ActionSupport.ActionListAction(subActions);
                actions.addAction(actionListAction);
                actionListAction.setEnabled(mapping.isEnabled());
                prevWasSeparator = false;
            } else if (action instanceof SoapUIMultiAction) {
                List<ModelItem> targets = new ArrayList<ModelItem>();
                for (ModelItem target : modelItems) {
                    if (action.applies(target)) {
                        targets.add(target);
                    }
                }

                if (targets.size() > 0) {
                    SwingMultiActionDelegate actionDelegate = new SwingMultiActionDelegate(mapping, modelItems);
                    actions.addAction(actionDelegate);
                    if (mapping.isDefault()) {
                        actions.setDefaultAction(actionDelegate);
                    }

                    actionDelegate.setEnabled(mapping.isEnabled());
                    prevWasSeparator = false;
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.support.action.SoapUIActionMapping

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.