Examples of XFormDialogBuilder


Examples of com.eviware.x.form.XFormDialogBuilder

    return values;
  }

  protected XFormDialog buildDialog( Interface modelItem )
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( messages.get( "Dialog.Title" ) );

    XForm mainForm = builder.createForm( messages.get( "Dialog.Basic.Label" ) );
    addWSDLFields( mainForm, modelItem );

    mainForm.addTextField( OUTPUT, messages.get( "Dialog.Basic.Output" ), XForm.FieldType.PROJECT_FOLDER );
    mainForm.addCheckBox( SERVER_SIDE, messages.get( "Dialog.Basic.ServerSide" ) );
    mainForm.addCheckBox( ALL, messages.get( "Dialog.Basic.All" ) );

    mainForm.addComboBox( DEPLOY_SCOPE, new String[] { "none", "Application", "Session", "Request" },
        messages.get( "Axis1XWSDL2JavaAction.Dialog.Basic.AddScope" ) );

    mainForm.addComboBox( SKELETON_DEPLOY, new String[] { "none", "true", "false" },
        messages.get( "Dialog.Basic.DeploySkeleton" ) );

    mainForm.addCheckBox( NO_IMPORTS, messages.get( "Dialog.Basic.NoImports" ) );
    mainForm.addCheckBox( NO_WRAPPED, messages.get( "Dialog.Basic.NoWrapped" ) );
    mainForm.addCheckBox( TEST_CASE, messages.get( "Dialog.Basic.TestCase" ) );
    mainForm.addCheckBox( HELPER_GEN, messages.get( "Dialog.Basic.HelperGen" ) );
    mainForm.addCheckBox( WRAP_ARRAYS, messages.get( "Dialog.Basic.WrapArrays" ) );

    XForm advForm = builder.createForm( messages.get( "Dialog.Advanced.Label" ) );
    advForm.addComboBox( TYPE_MAPPING_VERSION, new String[] { "1.2", "1.1" },
        messages.get( "Dialog.Advanced.TypeMappingVersion" ) );

    advForm.addTextField( IMPLCLASS, messages.get( "Dialog.Advanced.ImplClass" ), XForm.FieldType.JAVA_CLASS );
    advForm.addTextField( FACTORY, messages.get( "Dialog.Advanced.Factory" ), XForm.FieldType.JAVA_CLASS );

    advForm.addTextField( PACKAGE, messages.get( "Dialog.Advanced.Package" ), XForm.FieldType.JAVA_PACKAGE );
    advForm.addNameSpaceTable( NAMESPACE_MAPPING, modelItem );

    advForm.addTextField( USERNAME, messages.get( "Dialog.Advanced.Username" ), XForm.FieldType.TEXT );
    advForm.addTextField( PASSWORD, messages.get( "Dialog.Advanced.Password" ), XForm.FieldType.PASSWORD );

    buildArgsForm( builder, true, "WSDL2Java" ); //$NON-NLS-1$

    return builder.buildDialog( buildDefaultActions( HelpUrls.AXIS1X_HELP_URL, modelItem ),
        messages.get( "Dialog.Description" ), UISupport.TOOL_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

      throw new RuntimeException( "formClass is not annotated correctly.." );
    }

    MessageSupport messages = MessageSupport.getMessages( formClass );

    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( messages.get( formAnnotation.name() ) );
    XForm form = builder.createForm( "Basic" );

    for( Field field : formClass.getFields() )
    {
      AField fieldAnnotation = field.getAnnotation( AField.class );
      if( fieldAnnotation != null )
      {
        try
        {
          addFormField( form, field, fieldAnnotation, messages );
        }
        catch( Exception e )
        {
          e.printStackTrace();
        }
      }
    }

    ActionList defaultActions = formAnnotation.helpUrl() == null ? builder.buildOkCancelActions() : builder
        .buildOkCancelHelpActions( formAnnotation.helpUrl() );

    if( actions == null )
      actions = defaultActions;
    else
      actions.addActions( defaultActions );

    XFormDialog dialog = builder.buildDialog( actions, messages.get( formAnnotation.description() ),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

      throw new RuntimeException( "formClass is not annotated correctly.." );
    }

    MessageSupport messages = MessageSupport.getMessages( formClass );

    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( messages.get( formAnnotation.name() ) );
    XForm form = builder.createForm( "Basic" );

    for( Field field : formClass.getFields() )
    {
      AField fieldAnnotation = field.getAnnotation( AField.class );
      if( fieldAnnotation != null )
      {
        try
        {
          addFormField( form, field, fieldAnnotation, messages );
        }
        catch( Exception e )
        {
          e.printStackTrace();
        }
      }
    }

    ActionList defaultActions = formAnnotation.helpUrl() == null ? null : builder.buildHelpActions( formAnnotation
        .helpUrl() );

    if( actions == null )
      actions = defaultActions;
    else
    {
      // since there is only one action do it like this
      actions.insertAction( defaultActions.getActionAt( 0 ), 0 );
    }
    XFormDialog dialog = builder.buildDialog( actions, messages.get( formAnnotation.description() ),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    {
      throw new RuntimeException( "formClass is not annotated correctly.." );
    }

    MessageSupport messages = MessageSupport.getMessages( tabbedFormClass );
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( formAnnotation.name() );

    for( Field field : tabbedFormClass.getFields() )
    {
      APage pageAnnotation = field.getAnnotation( APage.class );
      if( pageAnnotation != null )
      {
        buildForm( builder, pageAnnotation.name(), field.getType(), messages );
      }

      AField fieldAnnotation = field.getAnnotation( AField.class );
      if( fieldAnnotation != null )
      {
        try
        {
          Class<?> formClass = Class.forName( fieldAnnotation.description() );
          buildForm( builder, fieldAnnotation.name(), formClass, messages );
        }
        catch( Exception e )
        {
          SoapUI.logError( e );
        }
      }
    }

    ActionList defaultActions = formAnnotation.helpUrl().length() == 0 ? builder.buildOkCancelActions() : builder
        .buildOkCancelHelpActions( formAnnotation.helpUrl() );

    if( actions == null )
      actions = defaultActions;
    else
      actions.addActions( defaultActions );

    XFormDialog dialog = builder.buildDialog( actions, formAnnotation.description(),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    {
      throw new RuntimeException( "formClass is not annotated correctly.." );
    }

    MessageSupport messages = MessageSupport.getMessages( tabbedFormClass );
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( formAnnotation.name() );

    for( Field field : tabbedFormClass.getFields() )
    {
      APage pageAnnotation = field.getAnnotation( APage.class );
      if( pageAnnotation != null )
      {
        buildForm( builder, pageAnnotation.name(), field.getType(), messages );
      }

      AField fieldAnnotation = field.getAnnotation( AField.class );
      if( fieldAnnotation != null )
      {
        try
        {
          Class<?> formClass = Class.forName( fieldAnnotation.description() );
          buildForm( builder, fieldAnnotation.name(), formClass, messages );
        }
        catch( Exception e )
        {
          SoapUI.logError( e );
        }
      }
    }

    ActionList defaultActions = formAnnotation.helpUrl().length() == 0 ? null : builder
        .buildHelpActions( formAnnotation.helpUrl() );

    if( actions == null )
      actions = defaultActions;
    else
    {
      defaultActions.addActions( actions );
      actions = defaultActions;
    }

    XFormDialog dialog = builder.buildDialog( actions, formAnnotation.description(),
        UISupport.createImageIcon( formAnnotation.icon() ) );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    {
      throw new RuntimeException( "formClass is not annotated correctly.." );
    }

    MessageSupport messages = MessageSupport.getMessages( tabbedFormClass );
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( formAnnotation.name() );

    for( Field field : tabbedFormClass.getFields() )
    {
      APage pageAnnotation = field.getAnnotation( APage.class );
      if( pageAnnotation != null )
      {
        buildForm( builder, pageAnnotation.name(), field.getType(), messages );
      }
    }

    XFormDialog dialog = builder.buildWizard( formAnnotation.description(),
        UISupport.createImageIcon( formAnnotation.icon() ), formAnnotation.helpUrl() );

    return dialog;
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

  protected XFormDialog buildDialog( WsdlInterface modelItem )
  {
    if( modelItem == null )
      return null;

    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Launch TcpMon" );

    mainForm = builder.createForm( "Basic" );
    mainForm.addComboBox( ENDPOINT, new String[] { "" }, "endpoint to forward to" );
    mainForm.addTextField( PORT, "Local port to listen on.", XForm.FieldType.TEXT );
    mainForm.addCheckBox( ADD_ENDPOINT, "adds an endpoint to the interface pointing to the started monitor" );

    return builder.buildDialog( buildDefaultActions( HelpUrls.TCPMON_HELP_URL, modelItem ),
        "Specify arguments for launching TcpMon", UISupport.TOOL_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    super( "Generate WSDL with JBossWS", "Generates WSDL with the jbossws wstools utility" );
  }

  protected XFormDialog buildDialog( WsdlProject project )
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Generate JBossWS WSDL Artifacts" );

    XForm mainForm = builder.createForm( "Basic" );

    mainForm.addTextField( ENDPOINT, "Serice Endpoint Interface", XForm.FieldType.JAVA_CLASS );
    mainForm.addTextField( SERVICE_NAME, "The name of the generated Service", XForm.FieldType.TEXT );
    mainForm
        .addComboBox( STYLE, new String[] { Style.DOCUMENT.toString(), Style.RPC.toString() }, "The style to use" );
    mainForm.addComboBox( PARAMETER_STYLE,
        new String[] { ParameterStyle.BARE.toString(), ParameterStyle.WRAPPED.toString() }, "The style to use" );
    mainForm.addTextField( CLASSPATH, "Classpath to use", XForm.FieldType.PROJECT_FOLDER );
    mainForm.addTextField( OUTPUT, "The root directory for all emitted files.", XForm.FieldType.PROJECT_FOLDER );
    mainForm.addTextField( MAPPING, "mapping file to generate", XForm.FieldType.PROJECT_FILE );
    mainForm.addTextField( TARGET_NAMESPACE, "The target namespace for the generated WSDL", XForm.FieldType.TEXT );
    mainForm.addTextField( TYPES_NAMESPACE, "The namespace for the generated types", XForm.FieldType.TEXT );
    mainForm.addTextField( EJB_LINK, "The name of the source EJB to link to", XForm.FieldType.TEXT );
    mainForm.addTextField( SERVLET_LINK, "The name of the source Servlet to link to", XForm.FieldType.TEXT );

    buildArgsForm( builder, false, "wstools" );

    ActionList actions = buildDefaultActions( HelpUrls.WSTOOLS_HELP_URL, project );
    actions.addAction( new ShowConfigFileAction( "JBossWS Java2Wsdl", "Contents of generated wsconfig.xml file" )
    {
      protected String getConfigFile()
      {
        ConfigurationDocument configDocument = createConfigFile( getDialog().getValues() );
        return configDocument.toString();
      }
    } );

    return builder.buildDialog( actions, "Specify arguments for JBossWS wstools java2wsdl functionality",
        UISupport.TOOL_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    }
  }

  protected XFormDialog buildDialog( Interface modelItem )
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Axis2 artifacts" );
    XForm mainForm = builder.createForm( "Basic" );

    addWSDLFields( mainForm, modelItem );

    mainForm.addTextField( OUTPUT, "root directory for generated files.", XForm.FieldType.PROJECT_FOLDER );
    mainForm.addTextField( PACKAGE, "target package nam", XForm.FieldType.JAVA_PACKAGE );

    XFormField dbComboBox = mainForm.addComboBox( DATABINDING, new String[] { "xmlbeans", "adb", "jibx", "jaxme" },
        "Specifies the Databinding framework." );

    mainForm.addCheckBox( ASYNC, "(generate code only for async style)" );
    mainForm.addCheckBox( SYNC, "(generate code only for sync style)" );
    mainForm.addCheckBox( TESTCASE, "(Generate a test case)" );

    XFormField serverSideCB = mainForm.addCheckBox( SERVERSIDE, "(Generate server side code (i.e. skeletons))" );

    XFormField ssiCB = mainForm.addCheckBox( SERVERSIDEINTERFACE, "(Generate interface for server side)" );
    XFormField sdCB = mainForm.addCheckBox( SERICEDESCRIPTOR, "(Generate the service descriptor (i.e. server.xml).)" );
    serverSideCB.addComponentEnabler( ssiCB, "true" );
    serverSideCB.addComponentEnabler( sdCB, "true" );

    XForm advForm = builder.createForm( "Advanced" );

    advForm.addCheckBox( GENERATEALL, "(Genrates all the classes)" );
    advForm.addCheckBox( UNPACK, "(Unpacks the databinding classes)" );

    advForm.addTextField( SERVICE_NAME, "the service name to be code generated", XForm.FieldType.TEXT );
    advForm.addTextField( PORT_NAME, "the port name to be code generated", XForm.FieldType.TEXT );

    advForm.addComponent( NAMESPACE_MAPPING, new NamespaceTable( ( WsdlInterface )modelItem ) );

    XFormField adbWrapCB = advForm.addCheckBox( ADB_WRAP,
        "(Sets the packing flag. if true the classes will be packed.)" );
    XFormField adbWriteCB = advForm.addCheckBox( ADB_WRITE,
        "(Sets the write flag. If set to true the classes will be written by ADB)" );
    XFormTextField jibxCB = advForm.addTextField( JIBX_BINDING_FILE, "The JIBX binding file to use",
        XForm.FieldType.PROJECT_FILE );
    dbComboBox.addComponentEnabler( adbWrapCB, "adb" );
    dbComboBox.addComponentEnabler( adbWriteCB, "adb" );
    dbComboBox.addComponentEnabler( jibxCB, "jibx" );

    buildArgsForm( builder, false, "WSDL2Java" );

    return builder.buildDialog( buildDefaultActions( HelpUrls.AXIS2X_HELP_URL, modelItem ),
        "Specify arguments for Axis 2.X Wsdl2Java", UISupport.TOOL_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    return testStep;
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Add Request to TestCase" );
    XForm mainForm = builder.createForm( "Basic" );

    mainForm.addTextField( STEP_NAME, "Name of TestStep", XForm.FieldType.URL ).setWidth( 30 );

    mainForm.addCheckBox( ADD_SOAP_RESPONSE_ASSERTION, "(adds validation that response is a SOAP message)" );
    mainForm.addCheckBox( ADD_SCHEMA_ASSERTION, "(adds validation that response complies with its schema)" );
    mainForm.addCheckBox( ADD_SOAP_FAULT_ASSERTION, "(adds validation that response is not a SOAP Fault)" );
    closeRequestCheckBox = mainForm.addCheckBox( CLOSE_REQUEST, "(closes the current window for this request)" );
    mainForm.addCheckBox( SHOW_TESTCASE, "(opens the TestCase editor for the target TestCase)" );
    mainForm.addCheckBox( COPY_ATTACHMENTS, "(copies the requests attachments to the TestRequest)" );
    mainForm.addCheckBox( COPY_HTTPHEADERS, "(copies the requests HTTP-Headers to the TestRequest)" );

    dialog = builder.buildDialog( builder.buildOkCancelActions(),
        "Specify options for adding the request to a TestCase", UISupport.OPTIONS_ICON );

    dialogValues.put( ADD_SOAP_RESPONSE_ASSERTION, Boolean.TRUE.toString() );
  }
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.