You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/04/21 13:13:19 UTC

svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Author: simonetripodi
Date: Thu Apr 21 11:13:18 2011
New Revision: 1095657

URL: http://svn.apache.org/viewvc?rev=1095657&view=rev
Log:
trailing spaces

Modified:
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java?rev=1095657&r1=1095656&r2=1095657&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java Thu Apr 21 11:13:18 2011
@@ -30,11 +30,11 @@ import java.util.Properties;
  * @since 1.3
  */
 public class DefaultParser implements CommandLineParser
-{    
+{
     protected CommandLine cmd;
     protected Options options;
 
-    /** 
+    /**
      * Flag indicating how unrecognized tokens are handled. <tt>true</tt> to stop
      * the parsing and add the remaining tokens to the args list.
      * <tt>false</tt> to throw an exception. 
@@ -43,16 +43,16 @@ public class DefaultParser implements Co
 
     /** The token currently processed. */
     protected String currentToken;
-    
+ 
     /** The last option parsed. */
     protected Option currentOption;
-    
+ 
     /** Flag indicating if tokens should no longer be analysed and simply added as arguments of the command line. */
     protected boolean skipParsing;
-    
+ 
     /** The required options and groups expected to be found when parsing the command line. */
     protected List expectedOpts;
-    
+ 
     public CommandLine parse(Options options, String[] arguments) throws ParseException
     {
         return parse(options, arguments, null);
@@ -101,13 +101,13 @@ public class DefaultParser implements Co
         skipParsing = false;
         currentOption = null;
         expectedOpts = new ArrayList(options.getRequiredOptions());
-        
+
         // clear the data from the groups
         for (OptionGroup group : options.getOptionGroups())
         {
             group.setSelected(null);
         }
-        
+
         cmd = new CommandLine();
 
         if (arguments != null)
@@ -117,15 +117,15 @@ public class DefaultParser implements Co
                 handleToken(argument);
             }
         }
-        
+
         // check the arguments of the last option
         checkRequiredArgs();
-        
+
         // add the default options
         handleProperties(properties);
-        
+
         checkRequiredOptions();
-        
+
         return cmd;
     }
 
@@ -140,26 +140,26 @@ public class DefaultParser implements Co
         {
             return;
         }
-        
+
         for (Enumeration e = properties.propertyNames(); e.hasMoreElements();)
         {
             String option = e.nextElement().toString();
-            
+
             Option opt = options.getOption(option);
             if (opt == null)
             {
                 throw new UnrecognizedOptionException("Default option wasn't defined", option);
             }
-            
+
             // if the option is part of a group, check if another option of the group has been selected
             OptionGroup group = options.getOptionGroup(opt);
             boolean selected = group != null && group.getSelected() != null;
-            
+
             if (!cmd.hasOption(option) && !selected)
             {
                 // get the value from the properties
                 String value = properties.getProperty(option);
-                
+
                 if (opt.hasArg())
                 {
                     if (opt.getValues() == null || opt.getValues().length == 0)
@@ -174,7 +174,7 @@ public class DefaultParser implements Co
                     // if the value is not yes, true or 1 then don't add the option to the CommandLine
                     continue;
                 }
-                
+
                 handleOption(opt);
                 currentOption = null;
             }
@@ -189,7 +189,7 @@ public class DefaultParser implements Co
      * are not present.
      */
     private void checkRequiredOptions() throws MissingOptionException
-    {       
+    {
         // if there are required options that have not been processsed
         if (!expectedOpts.isEmpty())
         {
@@ -211,14 +211,14 @@ public class DefaultParser implements Co
 
     /**
      * Handle any command line token.
-     * 
+     *
      * @param token the command line token to handle
      * @throws ParseException
      */
     private void handleToken(String token) throws ParseException
     {
         currentToken = token;
-        
+
         if (skipParsing)
         {
             cmd.addArg(token);
@@ -243,7 +243,7 @@ public class DefaultParser implements Co
         {
             handleUnknownToken(token);
         }
-        
+
         if (currentOption != null && !currentOption.acceptsArg())
         {
             currentOption = null;
@@ -252,7 +252,7 @@ public class DefaultParser implements Co
 
     /**
      * Returns true is the token is a valid argument.
-     * 
+     *
      * @param token
      */
     private boolean isArgument(String token)
@@ -262,7 +262,7 @@ public class DefaultParser implements Co
 
     /**
      * Check if the token is a negative number.
-     * 
+     *
      * @param token
      */
     private boolean isNegativeNumber(String token)
@@ -280,7 +280,7 @@ public class DefaultParser implements Co
 
     /**
      * Tells if the token looks like an option.
-     * 
+     *
      * @param token
      */
     private boolean isOption(String token)
@@ -301,7 +301,7 @@ public class DefaultParser implements Co
 
     /**
      * Tells if the token looks like a long option.
-     * 
+     *
      * @param token
      */
     private boolean isLongOption(String token)
@@ -313,7 +313,7 @@ public class DefaultParser implements Co
 
         int pos = token.indexOf("=");
         String t = pos == -1 ? token : token.substring(0, pos);
-        
+
         if (!options.getMatchingOptions(t).isEmpty())
         {
             // long or partial long options (--L, -L, --L=V, -L=V, --l, --l=V)
@@ -334,7 +334,7 @@ public class DefaultParser implements Co
      * to the arguments of the command line. If the stopAtNonOption flag 
      * is set, this stops the parsing and the remaining tokens are added 
      * as-is in the arguments of the command line.
-     * 
+     *
      * @param token the command line token to handle
      */
     private void handleUnknownToken(String token) throws ParseException
@@ -343,7 +343,7 @@ public class DefaultParser implements Co
         {
             throw new UnrecognizedOptionException("Unrecognized option: " + token, token);
         }
-        
+
         cmd.addArg(token);
         if (stopAtNonOption)
         {
@@ -353,12 +353,12 @@ public class DefaultParser implements Co
 
     /**
      * Handles the following tokens:
-     * 
+     *
      * --L
      * --L=V
      * --L V
      * --l
-     * 
+     *
      * @param token the command line token to handle
      */
     private void handleLongOption(String token) throws ParseException
@@ -369,13 +369,13 @@ public class DefaultParser implements Co
         }
         else
         {
-            handleLongOptionWithEqual(token);                                   
+            handleLongOptionWithEqual(token);
         }
     }
 
     /**
      * Handles the following tokens:
-     * 
+     *
      * --L
      * -L
      * --l
@@ -402,12 +402,12 @@ public class DefaultParser implements Co
 
     /**
      * Handles the following tokens:
-     * 
+     *
      * --L=V
      * -L=V
      * --l=V
      * -l=V
-     * 
+     *
      * @param token the command line token to handle
      */
     private void handleLongOptionWithEqual(String token) throws ParseException
@@ -415,9 +415,9 @@ public class DefaultParser implements Co
         int pos = token.indexOf('=');
 
         String value = token.substring(pos + 1);
-        
+
         String opt = token.substring(0, pos);
-        
+
         List<String> matchingOpts = options.getMatchingOptions(opt);
         if (matchingOpts.isEmpty())
         {
@@ -430,7 +430,7 @@ public class DefaultParser implements Co
         else
         {
             Option option = options.getOption(matchingOpts.get(0));
-            
+
             if (option.acceptsArg())
             {
                 handleOption(option);
@@ -446,7 +446,7 @@ public class DefaultParser implements Co
 
     /**
      * Handles the following tokens:
-     * 
+     *
      * -S
      * -SV
      * -S V
@@ -454,21 +454,21 @@ public class DefaultParser implements Co
      * -S1S2
      * -S1S2 V
      * -SV1=V2
-     * 
+     *
      * -L
      * -LV
      * -L V
      * -L=V
      * -l
-     * 
+     *
      * @param token the command line token to handle
      */
     private void handleShortAndLongOption(String token) throws ParseException
     {
         String t = Util.stripLeadingHyphens(token);
-        
+
         int pos = t.indexOf('=');
-        
+
         if (t.length() == 1)
         {
             // -S
@@ -497,7 +497,7 @@ public class DefaultParser implements Co
             {
                 // look for a long prefix (-Xmx512m)
                 String opt = getLongPrefix(t);
-                
+
                 if (opt != null && options.getOption(opt).acceptsArg())
                 {
                     handleOption(options.getOption(opt));
@@ -523,7 +523,7 @@ public class DefaultParser implements Co
             // equal sign found (-xxx=yyy)
             String opt = t.substring(0, pos);
             String value = t.substring(pos + 1);
-            
+
             if (opt.length() == 1)
             {
                 // -S=V
@@ -557,13 +557,13 @@ public class DefaultParser implements Co
 
     /**
      * Search for a prefix that is the long name of an option (-Xmx512m)
-     * 
+     *
      * @param token
      */
     private String getLongPrefix(String token)
     {
         String t = Util.stripLeadingHyphens(token);
-        
+
         int i;
         String opt = null;
         for (i = t.length() - 2; i > 1; i--)
@@ -586,7 +586,7 @@ public class DefaultParser implements Co
     {
         String opt = token.substring(0, 1);
         Option option = options.getOption(opt);
-        
+
         return option != null && (option.getArgs() >= 2 || option.getArgs() == Option.UNLIMITED_VALUES);
     }
 
@@ -594,16 +594,16 @@ public class DefaultParser implements Co
     {
         // check the previous option before handling the next one
         checkRequiredArgs();
-        
+
         option = option.clone();
-        
+
         updateRequiredOptions(option);
-        
+
         cmd.addOption(option);
-        
+
         if (option.hasArg())
         {
-            currentOption = option;            
+            currentOption = option;
         }
         else
         {
@@ -613,7 +613,7 @@ public class DefaultParser implements Co
 
     /**
      * Removes the option or its group from the list of expected elements.
-     * 
+     *
      * @param option
      */
     private void updateRequiredOptions(Option option) throws AlreadySelectedException
@@ -671,7 +671,7 @@ public class DefaultParser implements Co
             if (options.hasOption(ch))
             {
                 handleOption(options.getOption(ch));
-                
+
                 if (currentOption != null && (token.length() != (i + 1)))
                 {
                     // add the trail as an argument of the option
@@ -680,7 +680,7 @@ public class DefaultParser implements Co
                 }
             }
             else
-            {                
+            {
                 handleUnknownToken(stopAtNonOption && i > 1 ? token.substring(i) : token);
                 break;
             }



Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by sebb <se...@gmail.com>.
On 21 April 2011 15:21, Matt Benson <gu...@gmail.com> wrote:
> On Thu, Apr 21, 2011 at 7:56 AM, Gary Gregory <ga...@gmail.com> wrote:
>> On Thu, Apr 21, 2011 at 8:08 AM, sebb <se...@gmail.com> wrote:
>>
>>> On 21 April 2011 12:22, Emmanuel Bourg <eb...@apache.org> wrote:
>>> > Le 21/04/2011 13:13, simonetripodi@apache.org a écrit :
>>> >
>>> >> @@ -117,15 +117,15 @@ public class DefaultParser implements Co
>>> >>                  handleToken(argument);
>>> >>              }
>>> >>          }
>>> >> -
>>> >> +
>>> >>          // check the arguments of the last option
>>> >>          checkRequiredArgs();
>>> >> -
>>> >> +
>>> >>          // add the default options
>>> >>          handleProperties(properties);
>>> >> -
>>> >> +
>>> >>          checkRequiredOptions();
>>> >> -
>>> >> +
>>> >>          return cmd;
>>> >>      }
>>> >
>>> >
>>> > For the record, I'd like to preserve this kind of trailing spaces in
>>> order
>>> > to keep the cursor on the indentation level when editing the code.
>>>
>>> Most editors will automatically indent correctly; Eclipse certainly
>>> does (though it tends to leave trailing spaces on blank lines).
>>>
>>
>> You can configure Eclipse's "Clean Up" operation to remove trailing spaces.
>
> There are other plugins that will do this as well; however this leads
> to many unrelated changes degrading the signal-to-noise ratio of a
> given commit.  I know because of the flak I have taken from other
> committers over this.  Simo's approach of a commit specifically
> targeting formatting, etc., issues seems better tolerated, as an
> onlooker can read the commit message and see that the change is not
> one of substance.  Conversely, he need not hunt through a maze of
> changes looking for the meaningful one.

+1

> Matt
>
>>
>> Gary
>>
>>>
>>> But so long as the code does not have any TABs, I'm not personally
>>> worried about a few trailing spaces.
>>>
>>> >
>>> > Emmanuel Bourg
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>> --
>> Thank you,
>> Gary
>>
>> http://garygregory.wordpress.com/
>> http://garygregory.com/
>> http://people.apache.org/~ggregory/
>> http://twitter.com/GaryGregory
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Gary Gregory <ga...@gmail.com>.
Perhaps a lot of these formatting messages would go away if we stored
Eclipse (or IDEs) settings in projects.

The ugly is that every IDE has different way of specifying this.

I wonder if we should have a project dir called "ide" with sub-dirs for
"eclipse", "netbeans", and so on, as desired. Developers can then copy his
IDE's folder to the right place and add it to the SVN ignore list if needed.

Gary

On Thu, Apr 21, 2011 at 10:21 AM, Matt Benson <gu...@gmail.com> wrote:

> On Thu, Apr 21, 2011 at 7:56 AM, Gary Gregory <ga...@gmail.com>
> wrote:
> > On Thu, Apr 21, 2011 at 8:08 AM, sebb <se...@gmail.com> wrote:
> >
> >> On 21 April 2011 12:22, Emmanuel Bourg <eb...@apache.org> wrote:
> >> > Le 21/04/2011 13:13, simonetripodi@apache.org a écrit :
> >> >
> >> >> @@ -117,15 +117,15 @@ public class DefaultParser implements Co
> >> >>                  handleToken(argument);
> >> >>              }
> >> >>          }
> >> >> -
> >> >> +
> >> >>          // check the arguments of the last option
> >> >>          checkRequiredArgs();
> >> >> -
> >> >> +
> >> >>          // add the default options
> >> >>          handleProperties(properties);
> >> >> -
> >> >> +
> >> >>          checkRequiredOptions();
> >> >> -
> >> >> +
> >> >>          return cmd;
> >> >>      }
> >> >
> >> >
> >> > For the record, I'd like to preserve this kind of trailing spaces in
> >> order
> >> > to keep the cursor on the indentation level when editing the code.
> >>
> >> Most editors will automatically indent correctly; Eclipse certainly
> >> does (though it tends to leave trailing spaces on blank lines).
> >>
> >
> > You can configure Eclipse's "Clean Up" operation to remove trailing
> spaces.
>
> There are other plugins that will do this as well; however this leads
> to many unrelated changes degrading the signal-to-noise ratio of a
> given commit.  I know because of the flak I have taken from other
> committers over this.  Simo's approach of a commit specifically
> targeting formatting, etc., issues seems better tolerated, as an
> onlooker can read the commit message and see that the change is not
> one of substance.  Conversely, he need not hunt through a maze of
> changes looking for the meaningful one.
>
> Matt
>
> >
> > Gary
> >
> >>
> >> But so long as the code does not have any TABs, I'm not personally
> >> worried about a few trailing spaces.
> >>
> >> >
> >> > Emmanuel Bourg
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> >> For additional commands, e-mail: dev-help@commons.apache.org
> >>
> >>
> >
> >
> > --
> > Thank you,
> > Gary
> >
> > http://garygregory.wordpress.com/
> > http://garygregory.com/
> > http://people.apache.org/~ggregory/
> > http://twitter.com/GaryGregory
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Matt Benson <gu...@gmail.com>.
On Thu, Apr 21, 2011 at 7:56 AM, Gary Gregory <ga...@gmail.com> wrote:
> On Thu, Apr 21, 2011 at 8:08 AM, sebb <se...@gmail.com> wrote:
>
>> On 21 April 2011 12:22, Emmanuel Bourg <eb...@apache.org> wrote:
>> > Le 21/04/2011 13:13, simonetripodi@apache.org a écrit :
>> >
>> >> @@ -117,15 +117,15 @@ public class DefaultParser implements Co
>> >>                  handleToken(argument);
>> >>              }
>> >>          }
>> >> -
>> >> +
>> >>          // check the arguments of the last option
>> >>          checkRequiredArgs();
>> >> -
>> >> +
>> >>          // add the default options
>> >>          handleProperties(properties);
>> >> -
>> >> +
>> >>          checkRequiredOptions();
>> >> -
>> >> +
>> >>          return cmd;
>> >>      }
>> >
>> >
>> > For the record, I'd like to preserve this kind of trailing spaces in
>> order
>> > to keep the cursor on the indentation level when editing the code.
>>
>> Most editors will automatically indent correctly; Eclipse certainly
>> does (though it tends to leave trailing spaces on blank lines).
>>
>
> You can configure Eclipse's "Clean Up" operation to remove trailing spaces.

There are other plugins that will do this as well; however this leads
to many unrelated changes degrading the signal-to-noise ratio of a
given commit.  I know because of the flak I have taken from other
committers over this.  Simo's approach of a commit specifically
targeting formatting, etc., issues seems better tolerated, as an
onlooker can read the commit message and see that the change is not
one of substance.  Conversely, he need not hunt through a maze of
changes looking for the meaningful one.

Matt

>
> Gary
>
>>
>> But so long as the code does not have any TABs, I'm not personally
>> worried about a few trailing spaces.
>>
>> >
>> > Emmanuel Bourg
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> --
> Thank you,
> Gary
>
> http://garygregory.wordpress.com/
> http://garygregory.com/
> http://people.apache.org/~ggregory/
> http://twitter.com/GaryGregory
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Gary Gregory <ga...@gmail.com>.
On Thu, Apr 21, 2011 at 8:08 AM, sebb <se...@gmail.com> wrote:

> On 21 April 2011 12:22, Emmanuel Bourg <eb...@apache.org> wrote:
> > Le 21/04/2011 13:13, simonetripodi@apache.org a écrit :
> >
> >> @@ -117,15 +117,15 @@ public class DefaultParser implements Co
> >>                  handleToken(argument);
> >>              }
> >>          }
> >> -
> >> +
> >>          // check the arguments of the last option
> >>          checkRequiredArgs();
> >> -
> >> +
> >>          // add the default options
> >>          handleProperties(properties);
> >> -
> >> +
> >>          checkRequiredOptions();
> >> -
> >> +
> >>          return cmd;
> >>      }
> >
> >
> > For the record, I'd like to preserve this kind of trailing spaces in
> order
> > to keep the cursor on the indentation level when editing the code.
>
> Most editors will automatically indent correctly; Eclipse certainly
> does (though it tends to leave trailing spaces on blank lines).
>

You can configure Eclipse's "Clean Up" operation to remove trailing spaces.

Gary

>
> But so long as the code does not have any TABs, I'm not personally
> worried about a few trailing spaces.
>
> >
> > Emmanuel Bourg
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by sebb <se...@gmail.com>.
On 21 April 2011 12:22, Emmanuel Bourg <eb...@apache.org> wrote:
> Le 21/04/2011 13:13, simonetripodi@apache.org a écrit :
>
>> @@ -117,15 +117,15 @@ public class DefaultParser implements Co
>>                  handleToken(argument);
>>              }
>>          }
>> -
>> +
>>          // check the arguments of the last option
>>          checkRequiredArgs();
>> -
>> +
>>          // add the default options
>>          handleProperties(properties);
>> -
>> +
>>          checkRequiredOptions();
>> -
>> +
>>          return cmd;
>>      }
>
>
> For the record, I'd like to preserve this kind of trailing spaces in order
> to keep the cursor on the indentation level when editing the code.

Most editors will automatically indent correctly; Eclipse certainly
does (though it tends to leave trailing spaces on blank lines).

But so long as the code does not have any TABs, I'm not personally
worried about a few trailing spaces.

>
> Emmanuel Bourg
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Gary Gregory <ga...@gmail.com>.
This space formatting requirement seems impossible to configure in a code
formatter (like Eclipse's.)

I am -1 if I cannot set up an Eclipse formatter for the project and not
think about it. Formatting by hand is a waste of my time.

Gary

On Thu, Apr 21, 2011 at 7:47 AM, Jörg Schaible
<jo...@scalaris.com>wrote:

> Emmanuel Bourg wrote:
>
> > Le 21/04/2011 13:25, Simone Tripodi a écrit :
> >> also on empty lines?
> >
> > In method bodies, yes.
>
> This means I'll never touch CLI sources!
>
> Sorry, but most editors will simply strip them.
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Jörg Schaible <jo...@scalaris.com>.
Emmanuel Bourg wrote:

> Le 21/04/2011 13:25, Simone Tripodi a écrit :
>> also on empty lines?
> 
> In method bodies, yes.

This means I'll never touch CLI sources!

Sorry, but most editors will simply strip them.

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Emmanuel Bourg <eb...@apache.org>.
Le 21/04/2011 13:25, Simone Tripodi a écrit :
> also on empty lines?

In method bodies, yes.

Emmanuel Bourg


Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Simone Tripodi <si...@apache.org>.
also on empty lines?

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Thu, Apr 21, 2011 at 1:22 PM, Emmanuel Bourg <eb...@apache.org> wrote:
> Le 21/04/2011 13:13, simonetripodi@apache.org a écrit :
>
>> @@ -117,15 +117,15 @@ public class DefaultParser implements Co
>>                  handleToken(argument);
>>              }
>>          }
>> -
>> +
>>          // check the arguments of the last option
>>          checkRequiredArgs();
>> -
>> +
>>          // add the default options
>>          handleProperties(properties);
>> -
>> +
>>          checkRequiredOptions();
>> -
>> +
>>          return cmd;
>>      }
>
>
> For the record, I'd like to preserve this kind of trailing spaces in order
> to keep the cursor on the indentation level when editing the code.
>
> Emmanuel Bourg
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: svn commit: r1095657 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/DefaultParser.java

Posted by Emmanuel Bourg <eb...@apache.org>.
Le 21/04/2011 13:13, simonetripodi@apache.org a écrit :

> @@ -117,15 +117,15 @@ public class DefaultParser implements Co
>                   handleToken(argument);
>               }
>           }
> -
> +
>           // check the arguments of the last option
>           checkRequiredArgs();
> -
> +
>           // add the default options
>           handleProperties(properties);
> -
> +
>           checkRequiredOptions();
> -
> +
>           return cmd;
>       }


For the record, I'd like to preserve this kind of trailing spaces in 
order to keep the cursor on the indentation level when editing the code.

Emmanuel Bourg