You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/11/06 20:07:43 UTC
svn commit: r592526 - in /incubator/cxf/tags/cxf-2.0.3-incubator: ./
tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/
tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/
tools/common/src/test/java/org/apache/c...
Author: dkulp
Date: Tue Nov 6 11:07:42 2007
New Revision: 592526
URL: http://svn.apache.org/viewvc?rev=592526&view=rev
Log:
Merged revisions 592524 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r592524 | dkulp | 2007-11-06 14:00:13 -0500 (Tue, 06 Nov 2007) | 2 lines
Last minute fix to fix the output of the -? on the command line tools
........
Modified:
incubator/cxf/tags/cxf-2.0.3-incubator/ (props changed)
incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java
incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParserTest.java
incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/resources/testtool.xml
Propchange: incubator/cxf/tags/cxf-2.0.3-incubator/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java?rev=592526&r1=592525&r2=592526&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java (original)
+++ incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java Tue Nov 6 11:07:42 2007
@@ -230,10 +230,9 @@
addWhiteNamespace(strbuffer, optSpan - originalStrs[j].length());
strbuffer.append(" ");
if (originalStrs[j + 1].length() > totalLen - beforeDesSpan) {
- String tmp = originalStrs[j + 1].substring(0, totalLen - beforeDesSpan);
- strbuffer.append(tmp);
- originalStrs[j + 1] = originalStrs[j + 1].substring(totalLen - beforeDesSpan,
- originalStrs[j + 1].length());
+ int lastIdx = totalLen - beforeDesSpan;
+ int lastIdx2 = splitAndAppendText(strbuffer, originalStrs[j + 1], 0, lastIdx);
+ originalStrs[j + 1] = originalStrs[j + 1].substring(lastIdx2);
strbuffer.append(lineSeparator);
} else {
strbuffer.append(originalStrs[j + 1]);
Modified: incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParserTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParserTest.java?rev=592526&r1=592525&r2=592526&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParserTest.java (original)
+++ incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParserTest.java Tue Nov 6 11:07:42 2007
@@ -265,7 +265,8 @@
String[] expected = new String[]{"[ -n <C++ Namespace> ]",
"Namespace",
"[ -impl ]",
- "impl",
+ "impl - the impl that will be used by this tool to do "
+ + "whatever it is this tool does.",
"[ -e <Enum Value> ]",
"enum",
"-r",
@@ -310,13 +311,15 @@
String usage = parser.getFormattedDetailedUsage();
assertNotNull(usage);
StringTokenizer st1 = new StringTokenizer(usage, System.getProperty("line.separator"));
- assertEquals(13, st1.countTokens());
+ assertEquals(14, st1.countTokens());
while (st1.hasMoreTokens()) {
String s = st1.nextToken();
if (s.indexOf("java package") != -1) {
s = s.trim();
assertTrue(s.charAt(s.length() - 1) != 'o');
+ } else if (s.indexOf("impl - the") != -1) {
+ assertTrue(s.charAt(s.length() - 1) == 'o');
}
}
Modified: incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/resources/testtool.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/resources/testtool.xml?rev=592526&r1=592525&r2=592526&view=diff
==============================================================================
--- incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/resources/testtool.xml (original)
+++ incubator/cxf/tags/cxf-2.0.3-incubator/tools/common/src/test/java/org/apache/cxf/tools/common/toolspec/parser/resources/testtool.xml Tue Nov 6 11:07:42 2007
@@ -39,6 +39,7 @@
</option>
<option id="impl" minOccurs="0">
+ <annotation>impl - the impl that will be used by this tool to do whatever it is this tool does.</annotation>
<switch>impl</switch>
</option>