On Fri, 16 Aug 2024 15:03:58 GMT, Nizar Benalla <nbena...@openjdk.org> wrote:
> Could I please get a review for this small clenup? I updated the `--help` > command output to match that of `man javadoc`. > > I also noticed that `--help-extended` was renamed to `--help-extra` at some > point but doc-comment was not changed, so I changed it. > I could create a separate issue for it if needed, just to keep a record of it. > > The new `javadoc --help` output is the following > > > javadoc --help > Usage: > javadoc [options] [packagenames] [sourcefiles] [@files] > where options include: > @<file> Read options and filenames from file > --add-modules <module>(,<module>)* > Root modules to resolve in addition to the initial modules, > or all modules on the module path if <module> is > ALL-MODULE-PATH. > -bootclasspath <path> > Override location of platform class files used for > non-modular > releases > -breakiterator > Compute first sentence with BreakIterator > --class-path <path>, -classpath <path>, -cp <path> > Specify where to find user class files > -doclet <class> > Generate output via alternate doclet > -docletpath <path> > Specify where to find doclet class files > --enable-preview > Enable preview language features. To be used in conjunction > with > either -source or --release. > -encoding <name> > Source file encoding name > -exclude <pkglist> > Specify a list of packages to exclude > --expand-requires (transitive|all) > Instructs the tool to expand the set of modules to be > documented. By default, only the modules given explicitly on > the command line will be documented. A value of "transitive" > will additionally include all "requires transitive" > dependencies of those modules. A value of "all" will include > all dependencies of those modules. > -extdirs <dirlist> > Override location of installed extensions > --help, -help, -?, -h > Display command-line options and exit > --help-extra, -X > Print a synopsis of nonstandard options and exit > -J<flag> Pass <flag> directly to the runtime system > --limit-modules <module>(,<module>)* > Limit the universe of observable modules > -locale <name> > Locale to be used, e.g. en_US or en... Outside this PR diff, do we need to lowercase this ["Standard Doclet"] similarly to how it is done in JDK-8290702, whose updates this PR carries over to javadoc help output? ["Standard Doclet"]: https://github.com/openjdk/jdk/blob/d0a265039a36292d87b249af0e8977982e5acc7b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties#L26-L25 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties line 481: > 479: > 480: doclet.usage.docfilessubdirs.description=\ > 481: Enables deep copying of `doc-files` directories. Subdirectories and > all\n\ Here and elsewhere: backticks mean code font in Markdown files you copied this message from, but they mean nothing in the console. In other properties files, we don't use backticks for such purposes. The closest we have is this in jar.properties: main.usage.summary.try=\ Try `jar --help' for more information. I think we can safely strip backticks throughout this PR. @jonathan-gibbons, thoughts? src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties line 697: > 695: doclet.usage.allow-script-in-comments.description=\ > 696: Allow JavaScript in documentation comments, and options\n\ > 697: whose value is _html-code_ Ditto for _ which means italics/emphasis in Markdown. src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOptions.java line 681: > 679: /** > 680: * Show command-line help for the extended options, as requested > by > 681: * the {@code --help-extra} option and its aliases. Again: good catch! ------------- PR Review: https://git.openjdk.org/jdk/pull/20618#pullrequestreview-2247586401 PR Review Comment: https://git.openjdk.org/jdk/pull/20618#discussion_r1723067382 PR Review Comment: https://git.openjdk.org/jdk/pull/20618#discussion_r1723190052 PR Review Comment: https://git.openjdk.org/jdk/pull/20618#discussion_r1723074103