8185740: The help-doc.html generated by the doclet is outdated
Reviewed-by: sundar
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Contents.java Mon Jul 09 13:25:08 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Contents.java Mon Jul 09 13:26:59 2018 -0700
@@ -118,7 +118,6 @@
public final Content indexLabel;
public final Content interfaceLabel;
public final Content interfaces;
- public final Content interfacesItalic;
public final Content methodDetailLabel;
public final Content methodLabel;
public final Content methodSummary;
@@ -157,9 +156,10 @@
public final Content properties;
public final Content propertyLabel;
public final Content propertyDetailsLabel;
- public final Content propertySummary;
+ public final Content propertySummaryLabel;
public final Content seeLabel;
public final Content serializedForm;
+ public final Content servicesLabel;
public final Content specifiedByLabel;
public final Content subclassesLabel;
public final Content subinterfacesLabel;
@@ -245,7 +245,6 @@
indexLabel = getContent("doclet.Index");
interfaceLabel = getContent("doclet.Interface");
interfaces = getContent("doclet.Interfaces");
- interfacesItalic = getContent("doclet.Interfaces_Italic");
methodDetailLabel = getContent("doclet.Method_Detail");
methodSummary = getContent("doclet.Method_Summary");
methodLabel = getContent("doclet.Method");
@@ -284,9 +283,10 @@
properties = getContent("doclet.Properties");
propertyLabel = getContent("doclet.Property");
propertyDetailsLabel = getContent("doclet.Property_Detail");
- propertySummary = getContent("doclet.Property_Summary");
+ propertySummaryLabel = getContent("doclet.Property_Summary");
seeLabel = getContent("doclet.See");
serializedForm = getContent("doclet.Serialized_Form");
+ servicesLabel = getContent("doclet.Services");
specifiedByLabel = getContent("doclet.Specified_By");
subclassesLabel = getContent("doclet.Subclasses");
subinterfacesLabel = getContent("doclet.Subinterfaces");
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java Mon Jul 09 13:25:08 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java Mon Jul 09 13:26:59 2018 -0700
@@ -143,9 +143,13 @@
htmlTree = (configuration.allowTag(HtmlTag.SECTION))
? HtmlTree.SECTION(overviewHeading)
: HtmlTree.LI(HtmlStyle.blockList, overviewHeading);
- Content overviewBody = contents.getContent("doclet.help.overview.body",
- links.createLink(DocPaths.overviewSummary(configuration.frames),
- resources.getText("doclet.Overview")));
+ String overviewKey = configuration.showModules
+ ? "doclet.help.overview.modules.body"
+ : "doclet.help.overview.packages.body";
+ Content overviewLink = links.createLink(
+ DocPaths.overviewSummary(configuration.frames),
+ resources.getText("doclet.Overview"));
+ Content overviewBody = contents.getContent(overviewKey, overviewLink);
Content overviewPara = HtmlTree.P(overviewBody);
htmlTree.addContent(overviewPara);
if (configuration.allowTag(HtmlTag.SECTION)) {
@@ -155,6 +159,29 @@
}
}
+ // Module
+ if (configuration.showModules) {
+ Content moduleHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+ contents.moduleLabel);
+ htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+ ? HtmlTree.SECTION(moduleHead)
+ : HtmlTree.LI(HtmlStyle.blockList, moduleHead);
+ Content moduleIntro = contents.getContent("doclet.help.module.intro");
+ Content modulePara = HtmlTree.P(moduleIntro);
+ htmlTree.addContent(modulePara);
+ HtmlTree ulModule = new HtmlTree(HtmlTag.UL);
+ ulModule.addContent(HtmlTree.LI(contents.packagesLabel));
+ ulModule.addContent(HtmlTree.LI(contents.modulesLabel));
+ ulModule.addContent(HtmlTree.LI(contents.servicesLabel));
+ htmlTree.addContent(ulModule);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
+
+ }
+
// Package
Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
contents.packageLabel);
@@ -165,7 +192,7 @@
Content packagePara = HtmlTree.P(packageIntro);
htmlTree.addContent(packagePara);
HtmlTree ulPackage = new HtmlTree(HtmlTag.UL);
- ulPackage.addContent(HtmlTree.LI(contents.interfacesItalic));
+ ulPackage.addContent(HtmlTree.LI(contents.interfaces));
ulPackage.addContent(HtmlTree.LI(contents.classes));
ulPackage.addContent(HtmlTree.LI(contents.enums));
ulPackage.addContent(HtmlTree.LI(contents.exceptions));
@@ -195,14 +222,18 @@
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.declaration")));
ul1.addContent(HtmlTree.LI(contents.getContent("doclet.help.class_interface.description")));
htmlTree.addContent(ul1);
+ htmlTree.addContent(new HtmlTree(HtmlTag.BR));
HtmlTree ul2 = new HtmlTree(HtmlTag.UL);
ul2.addContent(HtmlTree.LI(contents.nestedClassSummary));
ul2.addContent(HtmlTree.LI(contents.fieldSummaryLabel));
+ ul2.addContent(HtmlTree.LI(contents.propertySummaryLabel));
ul2.addContent(HtmlTree.LI(contents.constructorSummaryLabel));
ul2.addContent(HtmlTree.LI(contents.methodSummary));
htmlTree.addContent(ul2);
+ htmlTree.addContent(new HtmlTree(HtmlTag.BR));
HtmlTree ul3 = new HtmlTree(HtmlTag.UL);
ul3.addContent(HtmlTree.LI(contents.fieldDetailsLabel));
+ ul3.addContent(HtmlTree.LI(contents.propertyDetailsLabel));
ul3.addContent(HtmlTree.LI(contents.constructorDetailsLabel));
ul3.addContent(HtmlTree.LI(contents.methodDetailLabel));
htmlTree.addContent(ul3);
@@ -342,21 +373,6 @@
}
}
- // Prev/Next
- Content prevHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- contents.getContent("doclet.help.prev_next.head"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(prevHead)
- : HtmlTree.LI(HtmlStyle.blockList, prevHead);
- Content prevBody = contents.getContent("doclet.help.prev_next.body");
- Content prevPara = HtmlTree.P(prevBody);
- htmlTree.addContent(prevPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
-
// Frames
if (configuration.frames) {
Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
@@ -367,12 +383,12 @@
Content framesBody = contents.getContent("doclet.help.frames.body");
Content framePara = HtmlTree.P(framesBody);
htmlTree.addContent(framePara);
- }
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
+ if (configuration.allowTag(HtmlTag.SECTION)) {
+ ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+ } else {
+ ul.addContent(htmlTree);
+ }
}
// All Classes
@@ -425,9 +441,10 @@
}
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
- Content line30 = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase,
+ divContent.addContent(new HtmlTree(HtmlTag.HR));
+ Content footnote = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase,
contents.getContent("doclet.help.footnote"));
- divContent.addContent(line30);
+ divContent.addContent(footnote);
if (configuration.allowTag(HtmlTag.MAIN)) {
mainTree.addContent(divContent);
contentTree.addContent(mainTree);
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java Mon Jul 09 13:25:08 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java Mon Jul 09 13:26:59 2018 -0700
@@ -37,7 +37,6 @@
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
-import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
import jdk.javadoc.internal.doclets.toolkit.Content;
import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
@@ -206,7 +205,7 @@
@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- contents.propertySummary);
+ contents.propertySummaryLabel);
memberTree.addContent(label);
}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties Mon Jul 09 13:25:08 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties Mon Jul 09 13:26:59 2018 -0700
@@ -92,7 +92,7 @@
doclet.Description_From_Interface=Description copied from interface:
doclet.Description_From_Class=Description copied from class:
doclet.No_Non_Deprecated_Classes_To_Document=No non-deprecated classes found to document.
-doclet.Interfaces_Italic=Interfaces (italic)
+doclet.Interfaces=Interfaces
doclet.Enclosing_Class=Enclosing class:
doclet.Enclosing_Interface=Enclosing interface:
doclet.Window_Source_title=Source code
@@ -103,20 +103,26 @@
doclet.help.intro=\
This API (Application Programming Interface) document has pages corresponding to the items in \
the navigation bar, described as follows.
-doclet.help.overview.body=\
+doclet.help.overview.modules.body=\
+ The {0} page is the front page of this API document and provides a list of all modules with a \
+ summary for each. This page can also contain an overall description of the set of modules.
+doclet.help.overview.packages.body=\
The {0} page is the front page of this API document and provides a list of all packages with a \
summary for each. This page can also contain an overall description of the set of packages.
doclet.help.package.intro=\
Each package has a page that contains a list of its classes and interfaces, with a summary for \
- each. This page can contain six categories:
+ each. These pages may contain six categories:
+doclet.help.module.intro=\
+ Each module has a page that contains a list of its packages, dependencies on other modules, \
+ and services, with a summary for each. These page may contain three categories:
doclet.help.class_interface.head=\
- Class/Interface
+ Class or Interface
doclet.help.class_interface.intro=\
Each class, interface, nested class and nested interface has its own separate page. Each of \
these pages has three sections consisting of a class/interface description, summary tables, \
and detailed member descriptions:
doclet.help.class_interface.inheritance_diagram=\
- Class inheritance diagram
+ Class Inheritance Diagram
doclet.help.class_interface.subclasses=\
Direct Subclasses
doclet.help.class_interface.subinterfaces=\
@@ -124,9 +130,9 @@
doclet.help.class_interface.implementations=\
All Known Implementing Classes
doclet.help.class_interface.declaration=\
- Class/interface declaration
+ Class or Interface Declaration
doclet.help.class_interface.description=\
- Class/interface description
+ Class or Interface Description
doclet.help.class_interface.summary=\
Each summary entry contains the first sentence from the detailed description for that item. \
The summary entries are alphabetical, while the detailed descriptions are in the order they \
@@ -136,7 +142,7 @@
doclet.help.use.body=\
Each documented package, class and interface has its own Use page. This page describes what \
packages, classes, methods, constructors and fields use any part of the given class or \
- package. Given a class or interface A, its Use page includes subclasses of A, fields declared \
+ package. Given a class or interface A, its "Use" page includes subclasses of A, fields declared \
as A, methods that return A, and methods and constructors with parameters of type A. \
You can access this page by first going to the package, class or interface, then clicking on \
the "Use" link in the navigation bar.
@@ -144,12 +150,12 @@
Tree (Class Hierarchy)
doclet.help.tree.intro=\
There is a {0} page for all packages, plus a hierarchy for each package. Each hierarchy page \
- contains a list of classes and a list of interfaces. The classes are organized by inheritance \
- structure starting with {1}. The interfaces do not inherit from {1}.
+ contains a list of classes and a list of interfaces. Classes are organized by inheritance \
+ structure starting with {1}. Interfaces do not inherit from {1}.
doclet.help.tree.overview=\
When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
doclet.help.tree.package=\
- When viewing a particular package, class or interface page, clicking "Tree" displays the \
+ When viewing a particular package, class or interface page, clicking on "Tree" displays the \
hierarchy for only that package.
doclet.help.deprecated.body=\
The {0} page lists all of the API that have been deprecated. A deprecated API is not \
@@ -158,12 +164,8 @@
doclet.help.index.head=\
Index
doclet.help.index.body=\
- The {0} contains an alphabetic list of all classes, interfaces, constructors, methods, \
- and fields.
-doclet.help.prev_next.head=\
- Prev/Next
-doclet.help.prev_next.body=\
- These links take you to the next or previous class, interface, package, or related page.
+ The {0} contains an alphabetic index of all classes, interfaces, constructors, methods, \
+ and fields, as well as lists of all packages and all classes.
doclet.help.frames.head=\
Frames/No Frames
doclet.help.frames.body=\
@@ -179,19 +181,19 @@
doclet.help.constants.body=\
The {0} page lists the static final fields and their values.
doclet.help.footnote=\
- This help file applies to API documentation generated using the standard doclet.
+ This help file applies to API documentation generated by the standard doclet.
doclet.help.enum.intro=\
Each enum has its own separate page with the following sections:
doclet.help.enum.declaration=\
- Enum declaration
+ Enum Declaration
doclet.help.enum.definition=\
- Enum description
+ Enum Description
doclet.help.annotation_type.intro=\
Each annotation type has its own separate page with the following sections:
doclet.help.annotation_type.declaration=\
- Annotation Type declaration
+ Annotation Type Declaration
doclet.help.annotation_type.description=\
- Annotation Type description
+ Annotation Type Description
doclet.ClassUse_Packages.that.use.0=Packages that use {0}
doclet.ClassUse_Uses.of.0.in.1=Uses of {0} in {1}
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties Mon Jul 09 13:25:08 2018 -0700
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties Mon Jul 09 13:26:59 2018 -0700
@@ -75,6 +75,7 @@
doclet.See_Also=See Also:
doclet.See=See:
doclet.SerialData=Serial Data:
+doclet.Services=Services
doclet.Since=Since:
doclet.Throws=Throws:
doclet.Version=Version:
@@ -117,7 +118,6 @@
doclet.Exceptions=Exceptions
doclet.Errors=Errors
doclet.Classes=Classes
-doclet.Packages=Packages
doclet.packages=packages
doclet.modules=modules
doclet.types=types
--- a/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java Mon Jul 09 13:25:08 2018 -0700
+++ b/test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java Mon Jul 09 13:26:59 2018 -0700
@@ -360,7 +360,7 @@
"<section role=\"region\">\n"
+ "<h2>Package</h2>\n",
"<section role=\"region\">\n"
- + "<h2>Class/Interface</h2>\n",
+ + "<h2>Class or Interface</h2>\n",
"<footer role=\"contentinfo\">\n"
+ "<nav role=\"navigation\">\n"
+ "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
@@ -1290,7 +1290,7 @@
"<li class=\"blockList\">\n"
+ "<h2>Package</h2>",
"<li class=\"blockList\">\n"
- + "<h2>Class/Interface</h2>");
+ + "<h2>Class or Interface</h2>");
// Test for a regular class page and members (nested class, field, constructore and method)
checkOutput("pkg/AnotherClass.html", true,