File tree 2 files changed +12
-8
lines changed
java/src/main/java/com/github/dart_lang/jnigen/apisummarizer
2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1
1
package com .github .dart_lang .jnigen .apisummarizer ;
2
2
3
+ import java .io .PrintWriter ;
3
4
import java .util .Arrays ;
4
5
import org .apache .commons .cli .*;
5
6
@@ -63,15 +64,22 @@ public static SummarizerOptions parseArgs(String[] args) {
63
64
try {
64
65
cmd = parser .parse (options , args );
65
66
if (cmd .getArgs ().length < 1 ) {
66
- throw new ParseException ("Need to specify paths to source files " );
67
+ throw new ParseException ("Need to specify the package or class names " );
67
68
}
68
69
} catch (ParseException e ) {
69
- System .out .println (e .getMessage ());
70
+ System .err .println (e .getMessage ());
70
71
help .printHelp (
72
+ new PrintWriter (System .err , true ),
73
+ help .getWidth (),
71
74
"java -jar <JAR> [-s <SOURCE_DIR=.>] "
72
75
+ "[-c <CLASSES_JAR>] <CLASS_OR_PACKAGE_NAMES>\n "
73
76
+ "Class or package names should be fully qualified.\n \n " ,
74
- options );
77
+ null ,
78
+ options ,
79
+ help .getLeftPadding (),
80
+ help .getDescPadding (),
81
+ null ,
82
+ false );
75
83
System .exit (1 );
76
84
throw new RuntimeException ("Unreachable code" );
77
85
}
Original file line number Diff line number Diff line change @@ -71,11 +71,7 @@ class SummarizerCommand {
71
71
final joined = paths
72
72
.map ((uri) => uri.toFilePath ())
73
73
.join (Platform .isWindows ? ';' : ':' );
74
- if (option.endsWith ("=" )) {
75
- args.add (option + joined);
76
- } else {
77
- args.addAll ([option, joined]);
78
- }
74
+ args.addAll ([option, '"$joined "' ]);
79
75
}
80
76
}
81
77
You can’t perform that action at this time.
0 commit comments