author | pmuthuswamy |
Tue, 23 Apr 2019 18:28:48 +0530 | |
changeset 54596 | 86c1da00dd6a |
parent 54350 | 4f9772f4403d |
child 59294 | 48b88b9c11eb |
permissions | -rw-r--r-- |
10 | 1 |
/* |
53863
d001808c57e8
8218998: Add metadata to generated API documentation files
jjg
parents:
53562
diff
changeset
|
2 |
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
26 |
package jdk.javadoc.internal.doclets.formats.html; |
10 | 27 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
28 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
29 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
30 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
49551
0d4786e42471
8196200: Implement a navigation builder in javadoc
bpatel
parents:
48747
diff
changeset
|
31 |
import jdk.javadoc.internal.doclets.formats.html.markup.Navigation; |
0d4786e42471
8196200: Implement a navigation builder in javadoc
bpatel
parents:
48747
diff
changeset
|
32 |
import jdk.javadoc.internal.doclets.formats.html.markup.Navigation.PageMode; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
33 |
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
34 |
import jdk.javadoc.internal.doclets.toolkit.Content; |
40587 | 35 |
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
36 |
import jdk.javadoc.internal.doclets.toolkit.util.DocPath; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
37 |
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
38 |
|
10 | 39 |
|
40 |
/** |
|
41 |
* Generate the Help File for the generated API documentation. The help file |
|
42 |
* contents are helpful for browsing the generated documentation. |
|
43 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
44 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
45 |
* If you write code that depends on this, you do so at your own risk. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
46 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
47 |
* deletion without notice.</b> |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
48 |
* |
10 | 49 |
* @author Atul M Dambalkar |
50 |
*/ |
|
51 |
public class HelpWriter extends HtmlDocletWriter { |
|
52 |
||
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
53 |
HtmlTree mainTree = HtmlTree.MAIN(); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
54 |
|
49551
0d4786e42471
8196200: Implement a navigation builder in javadoc
bpatel
parents:
48747
diff
changeset
|
55 |
private final Navigation navBar; |
0d4786e42471
8196200: Implement a navigation builder in javadoc
bpatel
parents:
48747
diff
changeset
|
56 |
|
10 | 57 |
/** |
58 |
* Constructor to construct HelpWriter object. |
|
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47850
diff
changeset
|
59 |
* @param configuration the configuration |
10 | 60 |
* @param filename File to be generated. |
61 |
*/ |
|
45417 | 62 |
public HelpWriter(HtmlConfiguration configuration, |
40303 | 63 |
DocPath filename) { |
10 | 64 |
super(configuration, filename); |
49551
0d4786e42471
8196200: Implement a navigation builder in javadoc
bpatel
parents:
48747
diff
changeset
|
65 |
this.navBar = new Navigation(null, configuration, fixedNavDiv, PageMode.HELP, path); |
10 | 66 |
} |
67 |
||
68 |
/** |
|
69 |
* Construct the HelpWriter object and then use it to generate the help |
|
70 |
* file. The name of the generated file is "help-doc.html". The help file |
|
71 |
* will get generated if and only if "-helpfile" and "-nohelp" is not used |
|
72 |
* on the command line. |
|
40587 | 73 |
* |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47850
diff
changeset
|
74 |
* @param configuration the configuration |
40587 | 75 |
* @throws DocFileIOException if there is a problem while generating the documentation |
10 | 76 |
*/ |
45417 | 77 |
public static void generate(HtmlConfiguration configuration) throws DocFileIOException { |
40587 | 78 |
DocPath filename = DocPaths.HELP_DOC; |
79 |
HelpWriter helpgen = new HelpWriter(configuration, filename); |
|
80 |
helpgen.generateHelpFile(); |
|
10 | 81 |
} |
82 |
||
83 |
/** |
|
84 |
* Generate the help file contents. |
|
40587 | 85 |
* |
86 |
* @throws DocFileIOException if there is a problem while generating the documentation |
|
10 | 87 |
*/ |
40587 | 88 |
protected void generateHelpFile() throws DocFileIOException { |
52644
43efb4ca6d6c
8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents:
51092
diff
changeset
|
89 |
String title = resources.getText("doclet.Window_Help_title"); |
54350
4f9772f4403d
8215599: Remove support for javadoc "frames" mode
pmuthuswamy
parents:
54060
diff
changeset
|
90 |
HtmlTree body = getBody(getWindowTitle(title)); |
53562 | 91 |
HtmlTree htmlTree = HtmlTree.HEADER(); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
92 |
addTop(htmlTree); |
49551
0d4786e42471
8196200: Implement a navigation builder in javadoc
bpatel
parents:
48747
diff
changeset
|
93 |
navBar.setUserHeader(getUserHeaderFooter(true)); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
94 |
htmlTree.add(navBar.getContent(true)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
95 |
body.add(htmlTree); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
96 |
addHelpFileContents(body); |
53562 | 97 |
htmlTree = HtmlTree.FOOTER(); |
49551
0d4786e42471
8196200: Implement a navigation builder in javadoc
bpatel
parents:
48747
diff
changeset
|
98 |
navBar.setUserFooter(getUserHeaderFooter(false)); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
99 |
htmlTree.add(navBar.getContent(false)); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
100 |
addBottom(htmlTree); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
101 |
body.add(htmlTree); |
53880
3f1e9372557f
8219497: Unused parameter in HtmlDocletWriter::printHtmlDocument
jjg
parents:
53879
diff
changeset
|
102 |
printHtmlDocument(null, "help", body); |
10 | 103 |
} |
104 |
||
105 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
106 |
* Add the help file contents from the resource file to the content tree. While adding the |
10 | 107 |
* help file contents it also keeps track of user options. If "-notree" |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
108 |
* is used, then the "overview-tree.html" will not get added and hence |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
109 |
* help information also will not get added. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
110 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
111 |
* @param contentTree the content tree to which the help file contents will be added |
10 | 112 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
113 |
protected void addHelpFileContents(Content contentTree) { |
48747 | 114 |
// Heading |
53991 | 115 |
Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, false, HtmlStyle.title, |
48747 | 116 |
contents.getContent("doclet.help.main_heading")); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
117 |
Content div = HtmlTree.DIV(HtmlStyle.header, heading); |
48747 | 118 |
Content intro = HtmlTree.DIV(HtmlStyle.subTitle, |
119 |
contents.getContent("doclet.help.intro")); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
120 |
div.add(intro); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
121 |
mainTree.add(div); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
122 |
HtmlTree htmlTree; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
123 |
HtmlTree ul = new HtmlTree(HtmlTag.UL); |
47846 | 124 |
ul.setStyle(HtmlStyle.blockList); |
48747 | 125 |
|
126 |
// Overview |
|
10 | 127 |
if (configuration.createoverview) { |
53991 | 128 |
Content overviewHeading = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
40303 | 129 |
contents.overviewLabel); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
130 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, overviewHeading); |
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
131 |
String overviewKey = configuration.showModules |
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
132 |
? "doclet.help.overview.modules.body" |
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
133 |
: "doclet.help.overview.packages.body"; |
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
134 |
Content overviewLink = links.createLink( |
54350
4f9772f4403d
8215599: Remove support for javadoc "frames" mode
pmuthuswamy
parents:
54060
diff
changeset
|
135 |
DocPaths.INDEX, resources.getText("doclet.Overview")); |
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
136 |
Content overviewBody = contents.getContent(overviewKey, overviewLink); |
48747 | 137 |
Content overviewPara = HtmlTree.P(overviewBody); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
138 |
htmlTree.add(overviewPara); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
139 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
10 | 140 |
} |
48747 | 141 |
|
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
142 |
// Module |
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
143 |
if (configuration.showModules) { |
53991 | 144 |
Content moduleHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
145 |
contents.moduleLabel); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
146 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, moduleHead); |
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
147 |
Content moduleIntro = contents.getContent("doclet.help.module.intro"); |
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
148 |
Content modulePara = HtmlTree.P(moduleIntro); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
149 |
htmlTree.add(modulePara); |
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
150 |
HtmlTree ulModule = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
151 |
ulModule.add(HtmlTree.LI(contents.packagesLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
152 |
ulModule.add(HtmlTree.LI(contents.modulesLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
153 |
ulModule.add(HtmlTree.LI(contents.servicesLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
154 |
htmlTree.add(ulModule); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
155 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
156 |
} |
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
157 |
|
48747 | 158 |
// Package |
53991 | 159 |
Content packageHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
40303 | 160 |
contents.packageLabel); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
161 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, packageHead); |
48747 | 162 |
Content packageIntro = contents.getContent("doclet.help.package.intro"); |
163 |
Content packagePara = HtmlTree.P(packageIntro); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
164 |
htmlTree.add(packagePara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
165 |
HtmlTree ulPackage = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
166 |
ulPackage.add(HtmlTree.LI(contents.interfaces)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
167 |
ulPackage.add(HtmlTree.LI(contents.classes)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
168 |
ulPackage.add(HtmlTree.LI(contents.enums)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
169 |
ulPackage.add(HtmlTree.LI(contents.exceptions)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
170 |
ulPackage.add(HtmlTree.LI(contents.errors)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
171 |
ulPackage.add(HtmlTree.LI(contents.annotationTypes)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
172 |
htmlTree.add(ulPackage); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
173 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
48747 | 174 |
|
175 |
// Class/interface |
|
53991 | 176 |
Content classHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
48747 | 177 |
contents.getContent("doclet.help.class_interface.head")); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
178 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, classHead); |
48747 | 179 |
Content classIntro = contents.getContent("doclet.help.class_interface.intro"); |
180 |
Content classPara = HtmlTree.P(classIntro); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
181 |
htmlTree.add(classPara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
182 |
HtmlTree ul1 = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
183 |
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.inheritance_diagram"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
184 |
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subclasses"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
185 |
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subinterfaces"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
186 |
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.implementations"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
187 |
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.declaration"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
188 |
ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.description"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
189 |
htmlTree.add(ul1); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
190 |
htmlTree.add(new HtmlTree(HtmlTag.BR)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
191 |
HtmlTree ul2 = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
192 |
ul2.add(HtmlTree.LI(contents.nestedClassSummary)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
193 |
ul2.add(HtmlTree.LI(contents.fieldSummaryLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
194 |
ul2.add(HtmlTree.LI(contents.propertySummaryLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
195 |
ul2.add(HtmlTree.LI(contents.constructorSummaryLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
196 |
ul2.add(HtmlTree.LI(contents.methodSummary)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
197 |
htmlTree.add(ul2); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
198 |
htmlTree.add(new HtmlTree(HtmlTag.BR)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
199 |
HtmlTree ul3 = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
200 |
ul3.add(HtmlTree.LI(contents.fieldDetailsLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
201 |
ul3.add(HtmlTree.LI(contents.propertyDetailsLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
202 |
ul3.add(HtmlTree.LI(contents.constructorDetailsLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
203 |
ul3.add(HtmlTree.LI(contents.methodDetailLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
204 |
htmlTree.add(ul3); |
48747 | 205 |
Content classSummary = contents.getContent("doclet.help.class_interface.summary"); |
206 |
Content para = HtmlTree.P(classSummary); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
207 |
htmlTree.add(para); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
208 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
48747 | 209 |
|
210 |
// Annotation Types |
|
53991 | 211 |
Content aHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
40303 | 212 |
contents.annotationType); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
213 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, aHead); |
48747 | 214 |
Content aIntro = contents.getContent("doclet.help.annotation_type.intro"); |
215 |
Content aPara = HtmlTree.P(aIntro); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
216 |
htmlTree.add(aPara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
217 |
HtmlTree aul = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
218 |
aul.add(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.declaration"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
219 |
aul.add(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.description"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
220 |
aul.add(HtmlTree.LI(contents.annotateTypeRequiredMemberSummaryLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
221 |
aul.add(HtmlTree.LI(contents.annotateTypeOptionalMemberSummaryLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
222 |
aul.add(HtmlTree.LI(contents.annotationTypeMemberDetail)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
223 |
htmlTree.add(aul); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
224 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
48747 | 225 |
|
226 |
// Enums |
|
53991 | 227 |
Content enumHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, contents.enum_); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
228 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, enumHead); |
48747 | 229 |
Content eIntro = contents.getContent("doclet.help.enum.intro"); |
230 |
Content enumPara = HtmlTree.P(eIntro); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
231 |
htmlTree.add(enumPara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
232 |
HtmlTree eul = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
233 |
eul.add(HtmlTree.LI(contents.getContent("doclet.help.enum.declaration"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
234 |
eul.add(HtmlTree.LI(contents.getContent("doclet.help.enum.definition"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
235 |
eul.add(HtmlTree.LI(contents.enumConstantSummary)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
236 |
eul.add(HtmlTree.LI(contents.enumConstantDetailLabel)); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
237 |
htmlTree.add(eul); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
238 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
48747 | 239 |
|
240 |
// Class Use |
|
10 | 241 |
if (configuration.classuse) { |
53991 | 242 |
Content useHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
48747 | 243 |
contents.getContent("doclet.help.use.head")); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
244 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, useHead); |
48747 | 245 |
Content useBody = contents.getContent("doclet.help.use.body"); |
246 |
Content usePara = HtmlTree.P(useBody); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
247 |
htmlTree.add(usePara); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
248 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
10 | 249 |
} |
48747 | 250 |
|
251 |
// Tree |
|
10 | 252 |
if (configuration.createtree) { |
53991 | 253 |
Content treeHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
48747 | 254 |
contents.getContent("doclet.help.tree.head")); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
255 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, treeHead); |
48747 | 256 |
Content treeIntro = contents.getContent("doclet.help.tree.intro", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47850
diff
changeset
|
257 |
links.createLink(DocPaths.OVERVIEW_TREE, |
52644
43efb4ca6d6c
8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents:
51092
diff
changeset
|
258 |
resources.getText("doclet.Class_Hierarchy")), |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
259 |
HtmlTree.CODE(new StringContent("java.lang.Object"))); |
48747 | 260 |
Content treePara = HtmlTree.P(treeIntro); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
261 |
htmlTree.add(treePara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
262 |
HtmlTree tul = new HtmlTree(HtmlTag.UL); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
263 |
tul.add(HtmlTree.LI(contents.getContent("doclet.help.tree.overview"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
264 |
tul.add(HtmlTree.LI(contents.getContent("doclet.help.tree.package"))); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
265 |
htmlTree.add(tul); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
266 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
10 | 267 |
} |
48747 | 268 |
|
269 |
// Deprecated |
|
270 |
if (!(configuration.nodeprecatedlist || configuration.nodeprecated)) { |
|
53991 | 271 |
Content dHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
40303 | 272 |
contents.deprecatedAPI); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
273 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, dHead); |
48747 | 274 |
Content deprBody = contents.getContent("doclet.help.deprecated.body", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47850
diff
changeset
|
275 |
links.createLink(DocPaths.DEPRECATED_LIST, |
52644
43efb4ca6d6c
8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents:
51092
diff
changeset
|
276 |
resources.getText("doclet.Deprecated_API"))); |
48747 | 277 |
Content dPara = HtmlTree.P(deprBody); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
278 |
htmlTree.add(dPara); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
279 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
10 | 280 |
} |
48747 | 281 |
|
282 |
// Index |
|
10 | 283 |
if (configuration.createindex) { |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
284 |
Content indexlink; |
10 | 285 |
if (configuration.splitindex) { |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47850
diff
changeset
|
286 |
indexlink = links.createLink(DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)), |
52644
43efb4ca6d6c
8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents:
51092
diff
changeset
|
287 |
resources.getText("doclet.Index")); |
10 | 288 |
} else { |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47850
diff
changeset
|
289 |
indexlink = links.createLink(DocPaths.INDEX_ALL, |
52644
43efb4ca6d6c
8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents:
51092
diff
changeset
|
290 |
resources.getText("doclet.Index")); |
10 | 291 |
} |
53991 | 292 |
Content indexHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
48747 | 293 |
contents.getContent("doclet.help.index.head")); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
294 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, indexHead); |
48747 | 295 |
Content indexBody = contents.getContent("doclet.help.index.body", indexlink); |
296 |
Content indexPara = HtmlTree.P(indexBody); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
297 |
htmlTree.add(indexPara); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
298 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
10 | 299 |
} |
48747 | 300 |
|
301 |
// Serialized Form |
|
53991 | 302 |
Content sHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
40303 | 303 |
contents.serializedForm); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
304 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, sHead); |
48747 | 305 |
Content serialBody = contents.getContent("doclet.help.serial_form.body"); |
306 |
Content serialPara = HtmlTree.P(serialBody); |
|
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
307 |
htmlTree.add(serialPara); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
308 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
48747 | 309 |
|
310 |
// Constant Field Values |
|
53991 | 311 |
Content constHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
40303 | 312 |
contents.constantsSummaryTitle); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
313 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, constHead); |
48747 | 314 |
Content constantsBody = contents.getContent("doclet.help.constants.body", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47850
diff
changeset
|
315 |
links.createLink(DocPaths.CONSTANT_VALUES, |
40303 | 316 |
resources.getText("doclet.Constants_Summary"))); |
48747 | 317 |
Content constPara = HtmlTree.P(constantsBody); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
318 |
htmlTree.add(constPara); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
319 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
48747 | 320 |
|
51091
a602706ccaaa
8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents:
51018
diff
changeset
|
321 |
// Search |
53991 | 322 |
Content searchHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, |
51091
a602706ccaaa
8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents:
51018
diff
changeset
|
323 |
contents.getContent("doclet.help.search.head")); |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
324 |
htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, searchHead); |
51091
a602706ccaaa
8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents:
51018
diff
changeset
|
325 |
Content searchBody = contents.getContent("doclet.help.search.body"); |
a602706ccaaa
8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents:
51018
diff
changeset
|
326 |
Content searchPara = HtmlTree.P(searchBody); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
327 |
htmlTree.add(searchPara); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
328 |
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
51091
a602706ccaaa
8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents:
51018
diff
changeset
|
329 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
330 |
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
331 |
divContent.add(new HtmlTree(HtmlTag.HR)); |
51018
591c34a66d41
8185740: The help-doc.html generated by the doclet is outdated
jjg
parents:
49551
diff
changeset
|
332 |
Content footnote = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase, |
48747 | 333 |
contents.getContent("doclet.help.footnote")); |
54060
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
334 |
divContent.add(footnote); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
335 |
mainTree.add(divContent); |
53a95878619f
8220202: Simplify/standardize method naming for HtmlTree
jjg
parents:
53991
diff
changeset
|
336 |
contentTree.add(mainTree); |
10 | 337 |
} |
338 |
} |