author | jjg |
Tue, 09 Aug 2016 13:22:57 -0700 | |
changeset 40303 | 96a1226aca18 |
parent 35426 | 374342e56a56 |
child 40500 | f293dbb81a53 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
40303 | 2 |
* Copyright (c) 1998, 2016, 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 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
28 |
import java.io.*; |
14258 | 29 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
30 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
31 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
32 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
33 |
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
34 |
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
35 |
import jdk.javadoc.internal.doclets.toolkit.Content; |
40303 | 36 |
import jdk.javadoc.internal.doclets.toolkit.Messages; |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
37 |
import jdk.javadoc.internal.doclets.toolkit.util.DocPath; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
38 |
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
39 |
import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException; |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
29957
diff
changeset
|
40 |
|
10 | 41 |
|
42 |
/** |
|
43 |
* Generate the Help File for the generated API documentation. The help file |
|
44 |
* contents are helpful for browsing the generated documentation. |
|
45 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
46 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
47 |
* 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
|
48 |
* 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
|
49 |
* deletion without notice.</b> |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
50 |
* |
10 | 51 |
* @author Atul M Dambalkar |
52 |
*/ |
|
53 |
public class HelpWriter extends HtmlDocletWriter { |
|
54 |
||
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
55 |
HtmlTree mainTree = HtmlTree.MAIN(); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
56 |
|
10 | 57 |
/** |
58 |
* Constructor to construct HelpWriter object. |
|
59 |
* @param filename File to be generated. |
|
60 |
*/ |
|
61 |
public HelpWriter(ConfigurationImpl configuration, |
|
40303 | 62 |
DocPath filename) { |
10 | 63 |
super(configuration, filename); |
64 |
} |
|
65 |
||
66 |
/** |
|
67 |
* Construct the HelpWriter object and then use it to generate the help |
|
68 |
* file. The name of the generated file is "help-doc.html". The help file |
|
69 |
* will get generated if and only if "-helpfile" and "-nohelp" is not used |
|
70 |
* on the command line. |
|
71 |
* @throws DocletAbortException |
|
72 |
*/ |
|
73 |
public static void generate(ConfigurationImpl configuration) { |
|
74 |
HelpWriter helpgen; |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14265
diff
changeset
|
75 |
DocPath filename = DocPath.empty; |
10 | 76 |
try { |
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14265
diff
changeset
|
77 |
filename = DocPaths.HELP_DOC; |
10 | 78 |
helpgen = new HelpWriter(configuration, filename); |
79 |
helpgen.generateHelpFile(); |
|
80 |
} catch (IOException exc) { |
|
40303 | 81 |
Messages messages = configuration.getMessages(); |
82 |
messages.error("doclet.exception_encountered", |
|
10 | 83 |
exc.toString(), filename); |
19667
fdfce85627a9
8001669: javadoc internal DocletAbortException should set cause when appropriate
jjg
parents:
19254
diff
changeset
|
84 |
throw new DocletAbortException(exc); |
10 | 85 |
} |
86 |
} |
|
87 |
||
88 |
/** |
|
89 |
* Generate the help file contents. |
|
90 |
*/ |
|
14265
4e8e488eeae0
8000666: javadoc should write directly to Writer instead of composing strings
jjg
parents:
14260
diff
changeset
|
91 |
protected void generateHelpFile() throws IOException { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
92 |
String title = configuration.getText("doclet.Window_Help_title"); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
93 |
HtmlTree body = getBody(true, getWindowTitle(title)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
94 |
HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
95 |
? HtmlTree.HEADER() |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
96 |
: body; |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
97 |
addTop(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
98 |
addNavLinks(true, htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
99 |
if (configuration.allowTag(HtmlTag.HEADER)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
100 |
body.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
101 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
102 |
addHelpFileContents(body); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
103 |
if (configuration.allowTag(HtmlTag.FOOTER)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
104 |
htmlTree = HtmlTree.FOOTER(); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
105 |
} |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
106 |
addNavLinks(false, htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
107 |
addBottom(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
108 |
if (configuration.allowTag(HtmlTag.FOOTER)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
109 |
body.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
110 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
111 |
printHtmlDocument(null, true, body); |
10 | 112 |
} |
113 |
||
114 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
115 |
* Add the help file contents from the resource file to the content tree. While adding the |
10 | 116 |
* 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
|
117 |
* 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
|
118 |
* 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
|
119 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
120 |
* @param contentTree the content tree to which the help file contents will be added |
10 | 121 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
122 |
protected void addHelpFileContents(Content contentTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
123 |
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false, HtmlStyle.title, |
40303 | 124 |
contents.getContent("doclet.Help_line_1")); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
125 |
Content div = HtmlTree.DIV(HtmlStyle.header, heading); |
9068
6697b4cbba1d
7010342: End tag for element P is not open for few html files generated using new javadoc
bpatel
parents:
8848
diff
changeset
|
126 |
Content line2 = HtmlTree.DIV(HtmlStyle.subTitle, |
40303 | 127 |
contents.getContent("doclet.Help_line_2")); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
128 |
div.addContent(line2); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
129 |
if (configuration.allowTag(HtmlTag.MAIN)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
130 |
mainTree.addContent(div); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
131 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
132 |
contentTree.addContent(div); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
133 |
} |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
134 |
HtmlTree htmlTree; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
135 |
HtmlTree ul = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
136 |
ul.addStyle(HtmlStyle.blockList); |
10 | 137 |
if (configuration.createoverview) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
138 |
Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 139 |
contents.overviewLabel); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
140 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
141 |
? HtmlTree.SECTION(overviewHeading) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
142 |
: HtmlTree.LI(HtmlStyle.blockList, overviewHeading); |
40303 | 143 |
Content line3 = contents.getContent("doclet.Help_line_3", |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
144 |
getHyperLink(DocPaths.OVERVIEW_SUMMARY, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
145 |
configuration.getText("doclet.Overview"))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
146 |
Content overviewPara = HtmlTree.P(line3); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
147 |
htmlTree.addContent(overviewPara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
148 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
149 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
150 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
151 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
152 |
} |
10 | 153 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
154 |
Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 155 |
contents.packageLabel); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
156 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
157 |
? HtmlTree.SECTION(packageHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
158 |
: HtmlTree.LI(HtmlStyle.blockList, packageHead); |
40303 | 159 |
Content line4 = contents.getContent("doclet.Help_line_4"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
160 |
Content packagePara = HtmlTree.P(line4); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
161 |
htmlTree.addContent(packagePara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
162 |
HtmlTree ulPackage = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
163 |
ulPackage.addContent(HtmlTree.LI( |
40303 | 164 |
contents.interfacesItalic)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
165 |
ulPackage.addContent(HtmlTree.LI( |
40303 | 166 |
contents.classes)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
167 |
ulPackage.addContent(HtmlTree.LI( |
40303 | 168 |
contents.enums)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
169 |
ulPackage.addContent(HtmlTree.LI( |
40303 | 170 |
contents.exceptions)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
171 |
ulPackage.addContent(HtmlTree.LI( |
40303 | 172 |
contents.errors)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
173 |
ulPackage.addContent(HtmlTree.LI( |
40303 | 174 |
contents.annotationTypes)); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
175 |
htmlTree.addContent(ulPackage); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
176 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
177 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
178 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
179 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
180 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
181 |
Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 182 |
contents.getContent("doclet.Help_line_5")); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
183 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
184 |
? HtmlTree.SECTION(classHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
185 |
: HtmlTree.LI(HtmlStyle.blockList, classHead); |
40303 | 186 |
Content line6 = contents.getContent("doclet.Help_line_6"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
187 |
Content classPara = HtmlTree.P(line6); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
188 |
htmlTree.addContent(classPara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
189 |
HtmlTree ul1 = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
190 |
ul1.addContent(HtmlTree.LI( |
40303 | 191 |
contents.getContent("doclet.Help_line_7"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
192 |
ul1.addContent(HtmlTree.LI( |
40303 | 193 |
contents.getContent("doclet.Help_line_8"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
194 |
ul1.addContent(HtmlTree.LI( |
40303 | 195 |
contents.getContent("doclet.Help_line_9"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
196 |
ul1.addContent(HtmlTree.LI( |
40303 | 197 |
contents.getContent("doclet.Help_line_10"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
198 |
ul1.addContent(HtmlTree.LI( |
40303 | 199 |
contents.getContent("doclet.Help_line_11"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
200 |
ul1.addContent(HtmlTree.LI( |
40303 | 201 |
contents.getContent("doclet.Help_line_12"))); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
202 |
htmlTree.addContent(ul1); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
203 |
HtmlTree ul2 = new HtmlTree(HtmlTag.UL); |
40303 | 204 |
ul2.addContent(HtmlTree.LI(contents.nestedClassSummary)); |
205 |
ul2.addContent(HtmlTree.LI(contents.fieldSummaryLabel)); |
|
206 |
ul2.addContent(HtmlTree.LI(contents.constructorSummaryLabel)); |
|
207 |
ul2.addContent(HtmlTree.LI(contents.methodSummary)); |
|
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
208 |
htmlTree.addContent(ul2); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
209 |
HtmlTree ul3 = new HtmlTree(HtmlTag.UL); |
40303 | 210 |
ul3.addContent(HtmlTree.LI(contents.fieldDetailsLabel)); |
211 |
ul3.addContent(HtmlTree.LI(contents.constructorDetailsLabel)); |
|
212 |
ul3.addContent(HtmlTree.LI(contents.methodDetailLabel)); |
|
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
213 |
htmlTree.addContent(ul3); |
40303 | 214 |
Content line13 = contents.getContent("doclet.Help_line_13"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
215 |
Content para = HtmlTree.P(line13); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
216 |
htmlTree.addContent(para); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
217 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
218 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
219 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
220 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
221 |
} |
10 | 222 |
//Annotation Types |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
223 |
Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 224 |
contents.annotationType); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
225 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
226 |
? HtmlTree.SECTION(aHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
227 |
: HtmlTree.LI(HtmlStyle.blockList, aHead); |
40303 | 228 |
Content aline1 = contents.getContent("doclet.Help_annotation_type_line_1"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
229 |
Content aPara = HtmlTree.P(aline1); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
230 |
htmlTree.addContent(aPara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
231 |
HtmlTree aul = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
232 |
aul.addContent(HtmlTree.LI( |
40303 | 233 |
contents.getContent("doclet.Help_annotation_type_line_2"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
234 |
aul.addContent(HtmlTree.LI( |
40303 | 235 |
contents.getContent("doclet.Help_annotation_type_line_3"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
236 |
aul.addContent(HtmlTree.LI( |
40303 | 237 |
contents.annotateTypeRequiredMemberSummaryLabel)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
238 |
aul.addContent(HtmlTree.LI( |
40303 | 239 |
contents.annotateTypeOptionalMemberSummaryLabel)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
240 |
aul.addContent(HtmlTree.LI( |
40303 | 241 |
contents.annotationTypeMemberDetail)); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
242 |
htmlTree.addContent(aul); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
243 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
244 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
245 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
246 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
247 |
} |
10 | 248 |
//Enums |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
249 |
Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 250 |
contents.enum_); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
251 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
252 |
? HtmlTree.SECTION(enumHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
253 |
: HtmlTree.LI(HtmlStyle.blockList, enumHead); |
40303 | 254 |
Content eline1 = contents.getContent("doclet.Help_enum_line_1"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
255 |
Content enumPara = HtmlTree.P(eline1); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
256 |
htmlTree.addContent(enumPara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
257 |
HtmlTree eul = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
258 |
eul.addContent(HtmlTree.LI( |
40303 | 259 |
contents.getContent("doclet.Help_enum_line_2"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
260 |
eul.addContent(HtmlTree.LI( |
40303 | 261 |
contents.getContent("doclet.Help_enum_line_3"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
262 |
eul.addContent(HtmlTree.LI( |
40303 | 263 |
contents.enumConstantSummary)); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
264 |
eul.addContent(HtmlTree.LI( |
40303 | 265 |
contents.enumConstantDetailLabel)); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
266 |
htmlTree.addContent(eul); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
267 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
268 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
269 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
270 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
271 |
} |
10 | 272 |
if (configuration.classuse) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
273 |
Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 274 |
contents.getContent("doclet.Help_line_14")); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
275 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
276 |
? HtmlTree.SECTION(useHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
277 |
: HtmlTree.LI(HtmlStyle.blockList, useHead); |
40303 | 278 |
Content line15 = contents.getContent("doclet.Help_line_15"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
279 |
Content usePara = HtmlTree.P(line15); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
280 |
htmlTree.addContent(usePara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
281 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
282 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
283 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
284 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
285 |
} |
10 | 286 |
} |
287 |
if (configuration.createtree) { |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
288 |
Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 289 |
contents.getContent("doclet.Help_line_16")); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
290 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
291 |
? HtmlTree.SECTION(treeHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
292 |
: HtmlTree.LI(HtmlStyle.blockList, treeHead); |
40303 | 293 |
Content line17 = contents.getContent("doclet.Help_line_17_with_tree_link", |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
294 |
getHyperLink(DocPaths.OVERVIEW_TREE, |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
295 |
configuration.getText("doclet.Class_Hierarchy")), |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
296 |
HtmlTree.CODE(new StringContent("java.lang.Object"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
297 |
Content treePara = HtmlTree.P(line17); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
298 |
htmlTree.addContent(treePara); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
299 |
HtmlTree tul = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
300 |
tul.addContent(HtmlTree.LI( |
40303 | 301 |
contents.getContent("doclet.Help_line_18"))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
302 |
tul.addContent(HtmlTree.LI( |
40303 | 303 |
contents.getContent("doclet.Help_line_19"))); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
304 |
htmlTree.addContent(tul); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
305 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
306 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
307 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
308 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
309 |
} |
10 | 310 |
} |
311 |
if (!(configuration.nodeprecatedlist || |
|
312 |
configuration.nodeprecated)) { |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
313 |
Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 314 |
contents.deprecatedAPI); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
315 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
316 |
? HtmlTree.SECTION(dHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
317 |
: HtmlTree.LI(HtmlStyle.blockList, dHead); |
40303 | 318 |
Content line20 = contents.getContent("doclet.Help_line_20_with_deprecated_api_link", |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
319 |
getHyperLink(DocPaths.DEPRECATED_LIST, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
320 |
configuration.getText("doclet.Deprecated_API"))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
321 |
Content dPara = HtmlTree.P(line20); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
322 |
htmlTree.addContent(dPara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
323 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
324 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
325 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
326 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
327 |
} |
10 | 328 |
} |
329 |
if (configuration.createindex) { |
|
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
330 |
Content indexlink; |
10 | 331 |
if (configuration.splitindex) { |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
332 |
indexlink = getHyperLink(DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)), |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
333 |
configuration.getText("doclet.Index")); |
10 | 334 |
} else { |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
335 |
indexlink = getHyperLink(DocPaths.INDEX_ALL, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
336 |
configuration.getText("doclet.Index")); |
10 | 337 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
338 |
Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 339 |
contents.getContent("doclet.Help_line_21")); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
340 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
341 |
? HtmlTree.SECTION(indexHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
342 |
: HtmlTree.LI(HtmlStyle.blockList, indexHead); |
40303 | 343 |
Content line22 = contents.getContent("doclet.Help_line_22", indexlink); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
344 |
Content indexPara = HtmlTree.P(line22); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
345 |
htmlTree.addContent(indexPara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
346 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
347 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
348 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
349 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
350 |
} |
10 | 351 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
352 |
Content prevHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 353 |
contents.getContent("doclet.Help_line_23")); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
354 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
355 |
? HtmlTree.SECTION(prevHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
356 |
: HtmlTree.LI(HtmlStyle.blockList, prevHead); |
40303 | 357 |
Content line24 = contents.getContent("doclet.Help_line_24"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
358 |
Content prevPara = HtmlTree.P(line24); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
359 |
htmlTree.addContent(prevPara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
360 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
361 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
362 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
363 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
364 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
365 |
Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 366 |
contents.getContent("doclet.Help_line_25")); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
367 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
368 |
? HtmlTree.SECTION(frameHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
369 |
: HtmlTree.LI(HtmlStyle.blockList, frameHead); |
40303 | 370 |
Content line26 = contents.getContent("doclet.Help_line_26"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
371 |
Content framePara = HtmlTree.P(line26); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
372 |
htmlTree.addContent(framePara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
373 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
374 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
375 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
376 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
377 |
} |
8848
3f1b154379d6
4743537: Help doesn't say what "All Classes" and other links really mean
bpatel
parents:
7681
diff
changeset
|
378 |
Content allclassesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 379 |
contents.allClassesLabel); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
380 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
381 |
? HtmlTree.SECTION(allclassesHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
382 |
: HtmlTree.LI(HtmlStyle.blockList, allclassesHead); |
40303 | 383 |
Content line27 = contents.getContent("doclet.Help_line_27", |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
384 |
getHyperLink(DocPaths.ALLCLASSES_NOFRAME, |
40303 | 385 |
resources.getText("doclet.All_Classes"))); |
8848
3f1b154379d6
4743537: Help doesn't say what "All Classes" and other links really mean
bpatel
parents:
7681
diff
changeset
|
386 |
Content allclassesPara = HtmlTree.P(line27); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
387 |
htmlTree.addContent(allclassesPara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
388 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
389 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
390 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
391 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
392 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
393 |
Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 394 |
contents.serializedForm); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
395 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
396 |
? HtmlTree.SECTION(sHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
397 |
: HtmlTree.LI(HtmlStyle.blockList, sHead); |
40303 | 398 |
Content line28 = contents.getContent("doclet.Help_line_28"); |
8848
3f1b154379d6
4743537: Help doesn't say what "All Classes" and other links really mean
bpatel
parents:
7681
diff
changeset
|
399 |
Content serialPara = HtmlTree.P(line28); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
400 |
htmlTree.addContent(serialPara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
401 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
402 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
403 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
404 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
405 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
406 |
Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, |
40303 | 407 |
contents.constantsSummaryTitle); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
408 |
htmlTree = (configuration.allowTag(HtmlTag.SECTION)) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
409 |
? HtmlTree.SECTION(constHead) |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
410 |
: HtmlTree.LI(HtmlStyle.blockList, constHead); |
40303 | 411 |
Content line29 = contents.getContent("doclet.Help_line_29", |
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
14357
diff
changeset
|
412 |
getHyperLink(DocPaths.CONSTANT_VALUES, |
40303 | 413 |
resources.getText("doclet.Constants_Summary"))); |
8848
3f1b154379d6
4743537: Help doesn't say what "All Classes" and other links really mean
bpatel
parents:
7681
diff
changeset
|
414 |
Content constPara = HtmlTree.P(line29); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
415 |
htmlTree.addContent(constPara); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
416 |
if (configuration.allowTag(HtmlTag.SECTION)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
417 |
ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree)); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
418 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
419 |
ul.addContent(htmlTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
420 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
421 |
Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul); |
40303 | 422 |
Content line30 = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase, contents.getContent("doclet.Help_line_30")); |
8848
3f1b154379d6
4743537: Help doesn't say what "All Classes" and other links really mean
bpatel
parents:
7681
diff
changeset
|
423 |
divContent.addContent(line30); |
29957
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
424 |
if (configuration.allowTag(HtmlTag.MAIN)) { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
425 |
mainTree.addContent(divContent); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
426 |
contentTree.addContent(mainTree); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
427 |
} else { |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
428 |
contentTree.addContent(divContent); |
7740f9657f56
8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents:
25874
diff
changeset
|
429 |
} |
10 | 430 |
} |
431 |
||
432 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
433 |
* Get the help label. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
434 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
435 |
* @return a content tree for the help label |
10 | 436 |
*/ |
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14265
diff
changeset
|
437 |
@Override |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
438 |
protected Content getNavLinkHelp() { |
40303 | 439 |
Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, contents.helpLabel); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
440 |
return li; |
10 | 441 |
} |
442 |
} |