author | ksrini |
Sun, 15 Jun 2014 08:41:57 -0700 | |
changeset 25454 | 376a52c9540c |
parent 24221 | 2376793dd33b |
permissions | -rw-r--r-- |
10 | 1 |
/* |
24221
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
2 |
* Copyright (c) 1997, 2014, 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 |
||
26 |
package com.sun.tools.doclets.formats.html; |
|
27 |
||
28 |
import java.io.*; |
|
29 |
import java.util.*; |
|
14258 | 30 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
31 |
import com.sun.javadoc.*; |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14358
diff
changeset
|
32 |
import com.sun.tools.javac.jvm.Profile; |
14258 | 33 |
import com.sun.tools.doclets.formats.html.markup.*; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
34 |
import com.sun.tools.doclets.internal.toolkit.*; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
35 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
10 | 36 |
|
37 |
/** |
|
38 |
* Generate the package index page "overview-summary.html" for the right-hand |
|
39 |
* frame. A click on the package name on this page will update the same frame |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14260
diff
changeset
|
40 |
* with the "package-summary.html" file for the clicked package. |
10 | 41 |
* |
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
42 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
43 |
* 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:
14259
diff
changeset
|
44 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
45 |
* deletion without notice.</b> |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
46 |
* |
10 | 47 |
* @author Atul M Dambalkar |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2212
diff
changeset
|
48 |
* @author Bhavesh Patel (Modified) |
10 | 49 |
*/ |
50 |
public class PackageIndexWriter extends AbstractPackageIndexWriter { |
|
51 |
||
52 |
/** |
|
53 |
* Root of the program structure. Used for "overview" documentation. |
|
54 |
*/ |
|
55 |
private RootDoc root; |
|
56 |
||
57 |
/** |
|
58 |
* Map representing the group of packages as specified on the command line. |
|
59 |
* |
|
60 |
* @see Group |
|
61 |
*/ |
|
868 | 62 |
private Map<String,List<PackageDoc>> groupPackageMap; |
10 | 63 |
|
64 |
/** |
|
65 |
* List to store the order groups as specified on the command line. |
|
66 |
*/ |
|
1789
7ac8c0815000
6765045: Remove rawtypes warnings from langtools
mcimadamore
parents:
1787
diff
changeset
|
67 |
private List<String> groupList; |
10 | 68 |
|
69 |
/** |
|
70 |
* Construct the PackageIndexWriter. Also constructs the grouping |
|
71 |
* information as provided on the command line by "-group" option. Stores |
|
72 |
* the order of groups specified by the user. |
|
73 |
* |
|
74 |
* @see Group |
|
75 |
*/ |
|
76 |
public PackageIndexWriter(ConfigurationImpl configuration, |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14260
diff
changeset
|
77 |
DocPath filename) |
10 | 78 |
throws IOException { |
79 |
super(configuration, filename); |
|
80 |
this.root = configuration.root; |
|
81 |
groupPackageMap = configuration.group.groupPackages(packages); |
|
82 |
groupList = configuration.group.getGroupList(); |
|
83 |
} |
|
84 |
||
85 |
/** |
|
86 |
* Generate the package index page for the right-hand frame. |
|
87 |
* |
|
88 |
* @param configuration the current configuration of the doclet. |
|
89 |
*/ |
|
90 |
public static void generate(ConfigurationImpl configuration) { |
|
91 |
PackageIndexWriter packgen; |
|
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14260
diff
changeset
|
92 |
DocPath filename = DocPaths.OVERVIEW_SUMMARY; |
10 | 93 |
try { |
94 |
packgen = new PackageIndexWriter(configuration, filename); |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
95 |
packgen.buildPackageIndexFile("doclet.Window_Overview_Summary", true); |
10 | 96 |
packgen.close(); |
97 |
} catch (IOException exc) { |
|
98 |
configuration.standardmessage.error( |
|
99 |
"doclet.exception_encountered", |
|
100 |
exc.toString(), filename); |
|
19667
fdfce85627a9
8001669: javadoc internal DocletAbortException should set cause when appropriate
jjg
parents:
19499
diff
changeset
|
101 |
throw new DocletAbortException(exc); |
10 | 102 |
} |
103 |
} |
|
104 |
||
105 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
106 |
* Depending upon the grouping information and their titles, add |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
107 |
* separate table indices for each package group. |
10 | 108 |
* |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
109 |
* @param body the documentation tree to which the index will be added |
10 | 110 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
111 |
protected void addIndex(Content body) { |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
21008
diff
changeset
|
112 |
for (String groupname : groupList) { |
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
21008
diff
changeset
|
113 |
List<PackageDoc> list = groupPackageMap.get(groupname); |
24221
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
114 |
if (list != null && !list.isEmpty()) { |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
115 |
addIndexContents(list, |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
21008
diff
changeset
|
116 |
groupname, configuration.getText("doclet.Member_Table_Summary", |
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
21008
diff
changeset
|
117 |
groupname, configuration.getText("doclet.packages")), body); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
118 |
} |
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 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
121 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
122 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
123 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
124 |
*/ |
19499
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
125 |
protected void addProfilesList(Content profileSummary, Content body) { |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
126 |
Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
127 |
Content profilesDiv = HtmlTree.DIV(h2); |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
128 |
Content ul = new HtmlTree(HtmlTag.UL); |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
129 |
String profileName; |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
130 |
for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
131 |
profileName = Profile.lookup(i).name; |
19937
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
132 |
// If the profile has valid packages to be documented, add it to the |
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
133 |
// profiles list on overview-summary.html page. |
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
134 |
if (configuration.shouldDocumentProfile(profileName)) { |
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
135 |
Content profileLinkContent = getTargetProfileLink("classFrame", |
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
136 |
new StringContent(profileName), profileName); |
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
137 |
Content li = HtmlTree.LI(profileLinkContent); |
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
138 |
ul.addContent(li); |
7dacecdfbad4
8015496: Information that package is deprecated is missing in profiles view
bpatel
parents:
19667
diff
changeset
|
139 |
} |
19499
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
140 |
} |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
141 |
profilesDiv.addContent(ul); |
23bc1014824b
8016921: Change the profiles table on overview-summary.html page to a list
bpatel
parents:
17570
diff
changeset
|
142 |
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14358
diff
changeset
|
143 |
body.addContent(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14358
diff
changeset
|
144 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14358
diff
changeset
|
145 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14358
diff
changeset
|
146 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14358
diff
changeset
|
147 |
* {@inheritDoc} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14358
diff
changeset
|
148 |
*/ |
24221
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
149 |
protected void addPackagesList(Collection<PackageDoc> packages, String text, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
150 |
String tableSummary, Content body) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
151 |
Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, tableSummary, |
17570
78512b2899db
8012183: replace some uses of Configuration.getText with Configuration.getResource
jjg
parents:
15726
diff
changeset
|
152 |
getTableCaption(new RawHtml(text))); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
153 |
table.addContent(getSummaryTableHeader(packageTableHeader, "col")); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
154 |
Content tbody = new HtmlTree(HtmlTag.TBODY); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
155 |
addPackagesList(packages, tbody); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
156 |
table.addContent(tbody); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
157 |
Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
158 |
body.addContent(div); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
159 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
160 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
161 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
162 |
* Adds list of packages in the index table. Generate link to each package. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
163 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
164 |
* @param packages Packages to which link is to be generated |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
165 |
* @param tbody the documentation tree to which the list will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
166 |
*/ |
24221
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
167 |
protected void addPackagesList(Collection<PackageDoc> packages, Content tbody) { |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
168 |
boolean altColor = true; |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
169 |
for (PackageDoc pkg : packages) { |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
170 |
if (pkg != null && !pkg.name().isEmpty()) { |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
24221
diff
changeset
|
171 |
if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) { |
24221
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
172 |
Content packageLinkContent = getPackageLink(pkg, getPackageName(pkg)); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
173 |
Content tdPackage = HtmlTree.TD(HtmlStyle.colFirst, packageLinkContent); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
174 |
HtmlTree tdSummary = new HtmlTree(HtmlTag.TD); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
175 |
tdSummary.addStyle(HtmlStyle.colLast); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
176 |
addSummaryComment(pkg, tdSummary); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
177 |
HtmlTree tr = HtmlTree.TR(tdPackage); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
178 |
tr.addContent(tdSummary); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
179 |
tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
180 |
tbody.addContent(tr); |
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
181 |
} |
10 | 182 |
} |
24221
2376793dd33b
8038583: [javadoc] Refactor uses of arrays to Collections
ksrini
parents:
22159
diff
changeset
|
183 |
altColor = !altColor; |
10 | 184 |
} |
185 |
} |
|
186 |
||
187 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
188 |
* Adds the overview summary comment for this documentation. Add one line |
10 | 189 |
* summary at the top of the page and generate a link to the description, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
190 |
* which is added at the end of this page. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
191 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
192 |
* @param body the documentation tree to which the overview header will be added |
10 | 193 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
194 |
protected void addOverviewHeader(Content body) { |
10 | 195 |
if (root.inlineTags().length > 0) { |
9068
6697b4cbba1d
7010342: End tag for element P is not open for few html files generated using new javadoc
bpatel
parents:
7681
diff
changeset
|
196 |
HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV); |
6697b4cbba1d
7010342: End tag for element P is not open for few html files generated using new javadoc
bpatel
parents:
7681
diff
changeset
|
197 |
subTitleDiv.addStyle(HtmlStyle.subTitle); |
6697b4cbba1d
7010342: End tag for element P is not open for few html files generated using new javadoc
bpatel
parents:
7681
diff
changeset
|
198 |
addSummaryComment(root, subTitleDiv); |
6697b4cbba1d
7010342: End tag for element P is not open for few html files generated using new javadoc
bpatel
parents:
7681
diff
changeset
|
199 |
Content div = HtmlTree.DIV(HtmlStyle.header, subTitleDiv); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
200 |
Content see = seeLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
201 |
see.addContent(" "); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
202 |
Content descPara = HtmlTree.P(see); |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19937
diff
changeset
|
203 |
Content descLink = getHyperLink(getDocLink( |
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19937
diff
changeset
|
204 |
SectionName.OVERVIEW_DESCRIPTION), |
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19937
diff
changeset
|
205 |
descriptionLabel, "", ""); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
206 |
descPara.addContent(descLink); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
207 |
div.addContent(descPara); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
208 |
body.addContent(div); |
10 | 209 |
} |
210 |
} |
|
211 |
||
212 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
213 |
* Adds the overview comment as provided in the file specified by the |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
214 |
* "-overview" option on the command line. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
215 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
216 |
* @param htmltree the documentation tree to which the overview comment will |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
217 |
* be added |
10 | 218 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
219 |
protected void addOverviewComment(Content htmltree) { |
10 | 220 |
if (root.inlineTags().length > 0) { |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19937
diff
changeset
|
221 |
htmltree.addContent( |
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19937
diff
changeset
|
222 |
getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION)); |
15559
4e397baa6e3d
8004353: Generated html is wrong for overview.html; content has incorrect css footer class
jjg
parents:
14358
diff
changeset
|
223 |
addInlineComment(root, htmltree); |
10 | 224 |
} |
225 |
} |
|
226 |
||
227 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
228 |
* Adds the tag information as provided in the file specified by the |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
229 |
* "-overview" option on the command line. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
230 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
231 |
* @param body the documentation tree to which the overview will be added |
10 | 232 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
233 |
protected void addOverview(Content body) throws IOException { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
234 |
HtmlTree div = new HtmlTree(HtmlTag.DIV); |
15559
4e397baa6e3d
8004353: Generated html is wrong for overview.html; content has incorrect css footer class
jjg
parents:
14358
diff
changeset
|
235 |
div.addStyle(HtmlStyle.contentContainer); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
236 |
addOverviewComment(div); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
237 |
addTagsInfo(root, div); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
238 |
body.addContent(div); |
10 | 239 |
} |
240 |
||
241 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
242 |
* Adds the top text (from the -top option), the upper |
10 | 243 |
* navigation bar, and then the title (from the"-title" |
244 |
* option), at the top of page. |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
245 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
246 |
* @body the documentation tree to which the navigation bar header will be added |
10 | 247 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
248 |
protected void addNavigationBarHeader(Content body) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
249 |
addTop(body); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
250 |
addNavLinks(true, body); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
251 |
addConfigurationTitle(body); |
10 | 252 |
} |
253 |
||
254 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
255 |
* Adds the lower navigation bar and the bottom text |
10 | 256 |
* (from the -bottom option) at the bottom of page. |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
257 |
* |
14259 | 258 |
* @param body the documentation tree to which the navigation bar footer will be added |
10 | 259 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
260 |
protected void addNavigationBarFooter(Content body) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
261 |
addNavLinks(false, body); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
262 |
addBottom(body); |
10 | 263 |
} |
264 |
} |