changeset 40314:52f8470ce3e4

8163524: doclet resources doclet.usage.NAME.name are redundant Reviewed-by: ksrini
author jjg
date Fri, 12 Aug 2016 15:41:47 -0700
parents a85f92c9a8ab
children 9e994c77db6a
files langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java
diffstat 2 files changed, 31 insertions(+), 78 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Fri Aug 12 11:49:18 2016 +0530
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Fri Aug 12 15:41:47 2016 -0700
@@ -191,180 +191,136 @@
 doclet.exception_encountered=Exception encountered while processing {1}\n{0}
 
 # option specifiers
-doclet.usage.d.name=d
 doclet.usage.d.parameters=<directory>
 doclet.usage.d.description=Destination directory for output files
 
-doclet.usage.use.name=use
 doclet.usage.use.description=Create class and package usage pages
 
-doclet.usage.version.name=version
 doclet.usage.version.description=Include @version paragraphs
 
-doclet.usage.author.name=author
 doclet.usage.author.description=Include @author paragraphs
 
-doclet.usage.docfilessubdirs.name=docfilessubdirs
 doclet.usage.docfilessubdirs.description=Recursively copy doc-file subdirectories
 
-doclet.usage.splitindex.name=splitindex
 doclet.usage.splitindex.description=Split index into one file per letter
 
-doclet.usage.windowtitle.name=windowtitle
-doclet.usage.windotitle.parameters=<text>
+doclet.usage.windowtitle.parameters=<text>
 doclet.usage.windowtitle.description=Browser window title for the documentation
 
-doclet.usage.doctitle.name=doctitle
 doclet.usage.doctitle.parameters=<html-code>
 doclet.usage.doctitle.description=Include title for the overview page
 
-doclet.usage.header.name=header
 doclet.usage.header.parameters=<html-code>
 doclet.usage.header.description=Include header text for each page
 
-doclet.usage.html4.name=html4
 doclet.usage.html4.description=Generate HTML 4.01 output
 
-doclet.usage.html5.name=html5
 doclet.usage.html5.description=Generate HTML 5 output
 
-doclet.usage.footer.name=footer
 doclet.usage.footer.parameters=<html-code>
 doclet.usage.footer.description=Include footer text for each page
 
-doclet.usage.top.name=top
 doclet.usage.top.parameters=<html-code>
 doclet.usage.top.description=Include top text for each page
 
-doclet.usage.bottom.name=bottom
 doclet.usage.bottom.parameters=<html-code>
 doclet.usage.bottom.description=Include bottom text for each page
 
-doclet.usage.link.name=link
 doclet.usage.link.parameters=<url>
 doclet.usage.link.description=Create links to javadoc output at <url>
 
-doclet.usage.linkoffline.name=linkoffline
 doclet.usage.linkoffline.parameters=<url1> <url2>
 doclet.usage.linkoffline.description=Link to docs at <url1> using package list\n\
-\                                  at <url2>
+\                                   at <url2>
 
-doclet.usage.excludedocfilessubdir.name=excludedocfilessubdir
 doclet.usage.excludedocfilessubdir.parameters=<name>:..
 doclet.usage.excludedocfilessubdir.description=\n\
-\                                  Exclude any doc-files subdirectories with\n\
-\                                  given name
+\                                   Exclude any doc-files subdirectories with\n\
+\                                   given name
 
-doclet.usage.group.name=group
 doclet.usage.group.parameters=<name> <p1>:<p2>..
 doclet.usage.group.description=Group specified packages together\n\
-\                                  in overview page
+\                                   in overview page
 
-doclet.usage.nocomment.name=nocomment
 doclet.usage.nocomment.description=Suppress description and tags, generate\n\
-\                                  only declarations
+\                                   only declarations
 
-doclet.usage.nodeprecated.name=nodeprecated
 doclet.usage.nodeprecated.description=Do not include @deprecated information
 
-doclet.usage.noqualifier.name=noqualifier
 doclet.usage.noqualifier.parameters=<name1>:<name2>:..
 doclet.usage.noqualifier.description=Exclude the list of qualifiers from the output
 
-doclet.usage.nosince.name=nosince
 doclet.usage.nosince.description=Do not include @since information
 
-doclet.usage.notimestamp.name=notimestamp
 doclet.usage.notimestamp.description=Do not include hidden time stamp
 
-doclet.usage.nodeprecatedlist.name=nodeprecatedlist
 doclet.usage.nodeprecatedlist.description=Do not generate deprecated list
 
-doclet.usage.notree.name=notree
 doclet.usage.notree.description=Do not generate class hierarchy
 
-doclet.usage.noindex.name=noindex
 doclet.usage.noindex.description=Do not generate index
 
-doclet.usage.nohelp.name=nohelp
 doclet.usage.nohelp.description=Do not generate help link
 
-doclet.usage.nonavbar.name=nonavbar
 doclet.usage.nonavbar.description=Do not generate navigation bar
 
-doclet.usage.nooverview.name=nooverview
 doclet.usage.nooverview.description=Do not generate overview pages
 
-doclet.usage.serialwarn.name=serialwarn
 doclet.usage.serialwarn.description=Generate warning about @serial tag
 
-doclet.usage.tag.name=tag
 doclet.usage.tag.parameters=<name>:<locations>:<header>
 doclet.usage.tag.description=\n\
-\                                  Specify single argument custom tags
+\                                   Specify single argument custom tags
 
-doclet.usage.taglet.name=taglet
 doclet.usage.taglet.description=The fully qualified name of Taglet to register
 
-doclet.usage.tagletpath.name=tagletpath
 doclet.usage.tagletpath.description=The path to Taglets
 
-doclet.usage.charset.name=charset
 doclet.usage.charset.parameters=<charset>
 doclet.usage.charset.description=Charset for cross-platform viewing of\n\
-\                                  generated documentation
+\                                   generated documentation
 
-doclet.usage.helpfile.name=helpfile
 doclet.usage.helpfile.parameters=<file>
 doclet.usage.helpfile.description=Include file that help link links to
 
-doclet.usage.linksource.name=linksource
 doclet.usage.linksource.description=Generate source in HTML
 
-doclet.usage.sourcetab.name=sourcetab
 doclet.usage.sourcetab.parameters=<tab length>
 doclet.usage.sourcetab.description=Specify the number of spaces each tab\n\
-\                                  takes up in the source
+\                                   takes up in the source
 
-doclet.usage.keywords.name=keywords
 doclet.usage.keywords.description=Include HTML meta tags with package,\n\
-\                                  class and member info
+\                                   class and member info
 
-doclet.usage.stylesheetfile.name=stylesheetfile
 doclet.usage.stylesheetfile.parameters=<path>
 doclet.usage.stylesheetfile.description=File to change style of the generated\n\
-\                                  documentation
+\                                   documentation
 
-doclet.usage.docencoding.name=docencoding
 doclet.usage.docencoding.parameters=<name>
 doclet.usage.docencoding.description=Specify the character encoding for the output
 
-doclet.xusage.xdocrootparent.name=Xdocrootparent
 doclet.xusage.xdocrootparent.parameters=<url>
 doclet.xusage.xdocrootparent.description=Replaces all @docRoot followed by /..\n\
-\                                  in doc comments with <url>
+\                                   in doc comments with <url>
 
-doclet.xusage.xdoclint.name=Xdoclint
 doclet.xusage.xdoclint.description=Enable recommended checks for problems in\n\
-\                                  javadoc comments
+\                                   javadoc comments
 
-doclet.xusage.xdoclint-extended.name=Xdoclint:
 doclet.xusage.xdoclint-extended.parameters=(all|none|[-]<group>)
 # L10N: do not localize these words: all none accessibility html missing reference syntax
 doclet.xusage.xdoclint-extended.description=Enable or disable specific checks\n\
-\                                  for problems in javadoc comments, where \n\
-\                                  <group> is one of accessibility, html,\n\
-\                                  missing, reference, or syntax.\n
+\                                   for problems in javadoc comments, where \n\
+\                                   <group> is one of accessibility, html,\n\
+\                                   missing, reference, or syntax.\n
 
-doclet.xusage.xdoclint-package.name=Xdoclint/package:
 doclet.xusage.xdoclint-package.parameters=([-]<packages>)
 doclet.xusage.xdoclint-package.description=\n\
-\                                  Enable or disable checks in specific\n\
-\                                  packages. <packages> is a comma separated\n\
-\                                  list of package specifiers. Package\n\
-\                                  specifier is either a qualified name of a\n\
-\                                  package or a package name prefix followed\n\
-\                                  by .*, which expands to all sub-packages\n\
-\                                  of the given package. Prefix the package\n\
-\                                  specifier with - to disable checks for\n\
-\                                  the specified packages.\n
+\                                   Enable or disable checks in specific\n\
+\                                   packages. <packages> is a comma separated\n\
+\                                   list of package specifiers. Package\n\
+\                                   specifier is either a qualified name of a\n\
+\                                   package or a package name prefix followed\n\
+\                                   by .*, which expands to all sub-packages\n\
+\                                   of the given package. Prefix the package\n\
+\                                   specifier with - to disable checks for\n\
+\                                   the specified packages.\n
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java	Fri Aug 12 11:49:18 2016 +0530
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java	Fri Aug 12 15:41:47 2016 -0700
@@ -1017,14 +1017,13 @@
         protected Option(Configuration config, String keyName, String name, int argCount) {
             c = config;
             this.name = name;
-            String key = keyName + "name";
-            String oname = getOptionsMessage(key);
-            if (oname.isEmpty()) {
+            String desc = getOptionsMessage(keyName + "description");
+            if (desc.isEmpty()) {
+                this.description = "<MISSING KEY>";
                 this.parameters = "<MISSING KEY>";
-                this.description = "<MISSING KEY>";
             } else {
+                this.description = desc;
                 this.parameters = getOptionsMessage(keyName + "parameters");
-                this.description = getOptionsMessage(keyName + "description");
             }
             this.argCount = argCount;
         }
@@ -1076,10 +1075,8 @@
         @Override
         public String toString() {
             String opt = name + (name.endsWith(":") ? "" : " ") + parameters;
-            int optlen = opt.length();
-            int spaces = 32 - optlen;
-            StringBuffer sb = new StringBuffer("  ").append(opt);
-            for (int i = 0; i < spaces; i++) {
+            StringBuffer sb = new StringBuffer("  ").append(opt).append(" ");
+            for (int i = opt.length(); i < 32; i++) {
                 sb.append(" ");
             }
             sb.append(description);