donaldp     02/03/19 02:47:51

  Modified:    cli/src/java/org/apache/avalon/excalibur/cli CLUtil.java
  Log:
  Need to print out argumentRequired blurn regardless fo whether option has a 
long form or not.
  
  Revision  Changes    Path
  1.9       +13 -10    
jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLUtil.java
  
  Index: CLUtil.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-excalibur/cli/src/java/org/apache/avalon/excalibur/cli/CLUtil.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CLUtil.java       16 Mar 2002 00:04:26 -0000      1.8
  +++ CLUtil.java       19 Mar 2002 10:47:51 -0000      1.9
  @@ -21,7 +21,7 @@
        * Format options into StringBuffer and return. This is typically used to
        * print "Usage" text in response to a "--help" or invalid option.
        *
  -     * @param options[] the option descriptors
  +     * @param options the option descriptors
        * @return the formatted description/help for options
        */
       public final static StringBuffer describeOptions( final 
CLOptionDescriptor[] options )
  @@ -43,7 +43,9 @@
                   CLOptionDescriptor.ARGUMENTS_REQUIRED_2 );
               boolean needComma = false;
               if( twoArgumentsRequired )
  +            {
                   argumentRequired = true;
  +            }
   
               sb.append( '\t' );
   
  @@ -63,16 +65,17 @@
   
                   sb.append( "--" );
                   sb.append( name );
  -                if( argumentRequired )
  -                {
  -                    sb.append( " <argument>" );
  -                }
  -                if( twoArgumentsRequired )
  -                {
  -                    sb.append( "=<value>" );
  -                }
  -                sb.append( lSep );
               }
  +
  +            if( argumentRequired )
  +            {
  +                sb.append( " <argument>" );
  +            }
  +            if( twoArgumentsRequired )
  +            {
  +                sb.append( "=<value>" );
  +            }
  +            sb.append( lSep );
   
               if( null != description )
               {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to