OpenJDK / jdk / jdk
changeset 59333:4bec5ceb7e59
8239816: Make handling of module / package / types consistent.
Reviewed-by: hannesw
author | jjg |
---|---|
date | Mon, 18 May 2020 13:24:35 -0700 |
parents | b78256118358 |
children | 45aa4f41e8d1 |
files | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ModuleSummaryWriter.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java test/langtools/jdk/javadoc/doclet/testModules/TestModules.java |
diffstat | 5 files changed, 17 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java Mon May 18 14:47:09 2020 -0400 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java Mon May 18 13:24:35 2020 -0700 @@ -840,18 +840,12 @@ addDeprecationInfo(tree); tree.add(MarkerComments.START_OF_MODULE_DESCRIPTION); addInlineComment(mdle, tree); + addTagsInfo(mdle, tree); moduleContentTree.add(tree); } } @Override - public void addModuleTags(Content moduleContentTree) { - Content tree = HtmlTree.SECTION(HtmlStyle.moduleTags); - addTagsInfo(mdle, tree); - moduleContentTree.add(tree); - } - - @Override public void addModuleContent(Content moduleContentTree) { bodyContents.addMainContent(moduleContentTree); }
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java Mon May 18 14:47:09 2020 -0400 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java Mon May 18 13:24:35 2020 -0700 @@ -232,14 +232,6 @@ moduleDescription, /** - * The class of the {@code dl} element used to present the block tags in the documentation - * comment for a module element. - * Additional (derived) information, such as implementation or inheritance details, may - * also appear in this element. - */ - moduleTags, - - /** * The class of the element used to present the documentation comment for package element. * The content of the block tags will be in a nested element with class {@link #notes}. */
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ModuleSummaryWriter.java Mon May 18 14:47:09 2020 -0400 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ModuleSummaryWriter.java Mon May 18 13:24:35 2020 -0700 @@ -77,15 +77,6 @@ void addModuleDescription(Content moduleContentTree); /** - * Adds the tag information from the "module-info.java" file to the documentation - * tree. - * - * @param moduleContentTree the content tree to which the module tags will - * be added - */ - void addModuleTags(Content moduleContentTree); - - /** * Adds the summary of modules to the list of summaries. * * @param summariesList the list of summaries
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java Mon May 18 14:47:09 2020 -0400 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ModuleSummaryBuilder.java Mon May 18 13:24:35 2020 -0700 @@ -122,7 +122,6 @@ Content moduleContentTree = moduleWriter.getContentHeader(); buildModuleDescription(moduleContentTree); - buildModuleTags(moduleContentTree); buildSummary(moduleContentTree); moduleWriter.addModuleContent(moduleContentTree); @@ -183,15 +182,4 @@ moduleWriter.addModuleDescription(moduleContentTree); } } - - /** - * Build the tags of the summary. - * - * @param moduleContentTree the tree to which the module tags will be added - */ - protected void buildModuleTags(Content moduleContentTree) { - if (!options.noComment()) { - moduleWriter.addModuleTags(moduleContentTree); - } - } }
--- a/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java Mon May 18 14:47:09 2020 -0400 +++ b/test/langtools/jdk/javadoc/doclet/testModules/TestModules.java Mon May 18 13:24:35 2020 -0700 @@ -27,7 +27,7 @@ * 8168766 8168688 8162674 8160196 8175799 8174974 8176778 8177562 8175218 * 8175823 8166306 8178043 8181622 8183511 8169819 8074407 8183037 8191464 * 8164407 8192007 8182765 8196200 8196201 8196202 8196202 8205593 8202462 - * 8184205 8219060 8223378 8234746 8239804 + * 8184205 8219060 8223378 8234746 8239804 8239816 * @summary Test modules support in javadoc. * @library ../../lib * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -633,8 +633,12 @@ lang.String)"><code>testMethod(String)</code></a>.""", """ Package Link: <a href="testpkgmdltags/package-summary.html"><code>testpkgmdltags</code></a>.""", - "<dt>Since:</dt>\n" - + "<dd>JDK 9</dd>", + """ + </div> + <dl class="notes">""", + """ + <dt>Since:</dt> + <dd>JDK 9</dd>""", """ <dt>See Also:</dt> <dd>"Test see tag",\s @@ -646,10 +650,12 @@ """ <dt>Module Tag:</dt> <dd>Just a simple module tag.</dd>""", - "<dt>Version:</dt>\n" - + "<dd>1.0</dd>", - "<dt>Author:</dt>\n" - + "<dd>Alice</dd>"); + """ + <dt>Version:</dt> + <dd>1.0</dd>""", + """ + <dt>Author:</dt> + <dd>Alice</dd>"""); checkOutput("moduletags/testpkgmdltags/TestClassInModuleTags.html", false, """ <dt>Module Tag:</dt> @@ -1222,8 +1228,9 @@ <div class="deprecation-comment">This module is deprecated using just the javadoc tag.</div> """); checkOutput("moduletags/module-summary.html", found, - "<p>@Deprecated\n" - + "</p>", + """ + <p>@Deprecated + </p>""", """ <div class="deprecation-block"><span class="deprecated-label">Deprecated.</span></div>"""); }