Package com.eviware.soapui.model

Examples of com.eviware.soapui.model.ModelItem


        if( row < 0 )
          return;

        row = statisticsTable.convertRowIndexToModel( row );

        ModelItem modelItem = row == statisticsTable.getRowCount() - 1 ? loadTest.getTestCase() : loadTest
            .getStatisticsModel().getTestStepAtRow( row );

        ActionList actions = ActionListBuilder.buildActions( modelItem );
        if( actions != null )
          actions.performDefaultAction( new ActionEvent( statisticsTable, 0, null ) );
View Full Code Here


  }

  public void dragGestureRecognized( DragGestureEvent e )
  {
    Point ptDragOrigin = e.getDragOrigin();
    ModelItem modelItem = dragAndDropable.getModelItemForLocation( ptDragOrigin.x, ptDragOrigin.y );
    if( modelItem == null )
      return;

    Rectangle raPath = dragAndDropable.getModelItemBounds( modelItem );
    if( raPath == null )
View Full Code Here

    try
    {
      processDialog = new ProcessDialog( runner.getName(), runner.getDescription(), runner.showLog(),
          runner.canCancel() );
      ModelItem modelItem = runner.getModelItem();
      if( modelItem == null )
        processDialog.log( "Running " + runner.getName() + "\r\n" );
      else
        processDialog.log( "Running " + runner.getName() + " for [" + modelItem.getName() + "]\r\n" );
      processDialog.run( runner );
    }
    catch( Exception ex )
    {
      UISupport.showErrorMessage( ex );
View Full Code Here

  }

  public String getModelItemOutputFolder( ModelItem modelItem )
  {
    List<ModelItem> chain = new ArrayList<ModelItem>();
    ModelItem p = modelItem;

    while( !( p instanceof Project ) )
    {
      chain.add( 0, p );
      p = p.getParent();
    }

    File dir = new File( getAbsoluteOutputFolder( modelItem ) );
    dir.mkdir();
View Full Code Here

  {
    this.label = label;
    this.target = target;
    this.xpathPropertyName = xpathPropertyName;

    ModelItem modelItem = property == null ? null : property.getModelItem();

    if( modelItem instanceof WsdlTestRequestStep )
    {
      operation = ( ( WsdlTestRequestStep )modelItem ).getTestRequest().getOperation();
      request = property.getName().equalsIgnoreCase( "Request" );
View Full Code Here

    recentEditorsMenu.removeAll();
  }

  public void desktopPanelClosed( DesktopPanel desktopPanel )
  {
    ModelItem modelItem = desktopPanel.getModelItem();
    if( modelItem == null || recentEditorsMenu.getItemCount() == 0 )
      return;

    if( isEmptyMarker( recentEditorsMenu.getItem( 0 ) ) )
      recentEditorsMenu.remove( 0 );
View Full Code Here

    for( ModelItem child : root.getChildren() )
    {
      if( child.getId().equals( id ) )
        return ( T )child;

      ModelItem result = findModelItemById( id, child );
      if( result != null )
        return ( T )result;
    }

    return null;
View Full Code Here

  public static boolean dependsOn( ModelItem source, ModelItem target )
  {
    if( source == target )
      return true;

    ModelItem p = source.getParent();
    while( p != null )
    {
      if( p == target )
        return true;

      p = p.getParent();
    }

    return false;
  }
View Full Code Here

    {
      JLabel label = ( JLabel )super.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus );

      if( value instanceof ModelItem )
      {
        ModelItem item = ( ModelItem )value;
        TreePath treePath = SoapUI.getNavigator().getTreePath( item );

        if( treePath == null )
        {
          if( !( item instanceof EmptyModelItem ) )
          {
            // listModel.setElementAt( new EmptyModelItem( "<removed>",
            // item.getIcon()), index );
          }

          label.setText( "<removed>" );
          label.setToolTipText( null );
        }
        else
        {
          String str = item.getName() + " [";

          for( int c = 1; c < treePath.getPathCount(); c++ )
          {
            SoapUITreeNode comp = ( SoapUITreeNode )treePath.getPathComponent( c );
            if( comp.getModelItem() instanceof EmptyModelItem )
              continue;

            if( c > 1 )
              str += " - ";

            str += comp.toString();
          }

          str += "]";

          label.setText( str );
          label.setToolTipText( item.getDescription() );
        }

        label.setIcon( item.getIcon() );
        label.setBorder( BorderFactory.createEmptyBorder( 2, 2, 2, 2 ) );
      }

      return label;
    }
View Full Code Here

    @SuppressWarnings( "unchecked" )
    private String createItemName( PathToResolve ptr )
    {
      String name = "";
      ModelItem modelItem = ptr.getOwner();
      try
      {
        name = modelItem.getName();
      }
      catch( Exception e )
      {
        e.getStackTrace();
      }

      while( modelItem.getParent() != null && !( modelItem.getParent() instanceof Project ) )
      {
        modelItem = modelItem.getParent();
        name = modelItem.getName() + " - " + name;
      }

      return name;
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.ModelItem

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.