[Japi-cvs] SF.net SVN: japi: [262] libs/argparser/trunk/src/net/sf/japi/io/args/ BasicCommand.java
Status: Beta
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2006-12-15 21:02:58
|
Revision: 262
http://svn.sourceforge.net/japi/?rev=262&view=rev
Author: christianhujer
Date: 2006-12-15 13:02:56 -0800 (Fri, 15 Dec 2006)
Log Message:
-----------
Fixed bugs: own resource bundle wasn't used, help header and footer were not used.
Modified Paths:
--------------
libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java
Modified: libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java
===================================================================
--- libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java 2006-12-15 21:01:10 UTC (rev 261)
+++ libs/argparser/trunk/src/net/sf/japi/io/args/BasicCommand.java 2006-12-15 21:02:56 UTC (rev 262)
@@ -81,6 +81,7 @@
}
final String formatString = "%-" + maxShort + "s%s%-" + maxLong + "s: %s%s%n";
final Formatter format = new Formatter(System.err);
+ format.format(getHelpHeader());
for (final Method optionMethod : optionMethods) {
final Option option = optionMethod.getAnnotation(Option.class);
final OptionType optionType = option.type();
@@ -98,12 +99,13 @@
String description;
try {
final String optionKey = option.key().equals("") ? optionMethod.getName() : option.key();
- description = getBundle().getString(optionKey);
+ description = getString(optionKey);
} catch (final MissingResourceException ignore) {
description = "";
}
format.format(formatString, StringJoiner.join(", ", shortNames), delim, StringJoiner.join(", ", longNames), description, optionType.getDescription());
}
+ format.format(getHelpFooter());
format.flush();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|