author | jjg |
Sun, 24 Feb 2013 11:36:58 -0800 | |
changeset 16319 | e586bfeb39c5 |
parent 15723 | 58a73dac9ee4 |
child 17559 | 87c28ee29329 |
child 18398 | 1935600c6f34 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
2 |
* Copyright (c) 1997, 2013, 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.markup; |
|
27 |
||
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
28 |
import java.io.*; |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
29 |
import java.util.*; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
30 |
|
10 | 31 |
import com.sun.tools.doclets.internal.toolkit.*; |
32 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
|
33 |
||
34 |
/** |
|
35 |
* Class for the Html format code generation. |
|
14266
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
36 |
* Initializes PrintWriter with FileWriter, to enable print |
10 | 37 |
* related methods to generate the code to the named File through FileWriter. |
38 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
39 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
40 |
* 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
|
41 |
* 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
|
42 |
* deletion without notice.</b> |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
43 |
* |
10 | 44 |
* @since 1.2 |
45 |
* @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:
2223
diff
changeset
|
46 |
* @author Bhavesh Patel (Modified) |
10 | 47 |
*/ |
14266
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
48 |
public class HtmlWriter { |
10 | 49 |
|
50 |
/** |
|
51 |
* The window title of this file |
|
52 |
*/ |
|
53 |
protected String winTitle; |
|
54 |
||
55 |
/** |
|
56 |
* The configuration |
|
57 |
*/ |
|
58 |
protected Configuration configuration; |
|
59 |
||
60 |
/** |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
61 |
* The flag to indicate whether a member details list is printed or not. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
62 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
63 |
protected boolean memberDetailsListPrinted; |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
64 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
65 |
/** |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
66 |
* Header for table displaying profiles and description.. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
67 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
68 |
protected final String[] profileTableHeader; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
69 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
70 |
/** |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
71 |
* Header for tables displaying packages and description.. |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
72 |
*/ |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
73 |
protected final String[] packageTableHeader; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
74 |
|
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
75 |
/** |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
76 |
* Summary for use tables displaying class and package use. |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
77 |
*/ |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
78 |
protected final String useTableSummary; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
79 |
|
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
80 |
/** |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
81 |
* Column header for class docs displaying Modifier and Type header. |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
82 |
*/ |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
83 |
protected final String modifierTypeHeader; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
84 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
85 |
public final Content overviewLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
86 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
87 |
public final Content defaultPackageLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
88 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
89 |
public final Content packageLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
90 |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
91 |
public final Content profileLabel; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
92 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
93 |
public final Content useLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
94 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
95 |
public final Content prevLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
96 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
97 |
public final Content nextLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
98 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
99 |
public final Content prevclassLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
100 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
101 |
public final Content nextclassLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
102 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
103 |
public final Content summaryLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
104 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
105 |
public final Content detailLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
106 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
107 |
public final Content framesLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
108 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
109 |
public final Content noframesLabel; |
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 |
public final Content treeLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
112 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
113 |
public final Content classLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
114 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
115 |
public final Content deprecatedLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
116 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
117 |
public final Content deprecatedPhrase; |
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 |
public final Content allclassesLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
120 |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
121 |
public final Content allpackagesLabel; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
122 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
123 |
public final Content allprofilesLabel; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
124 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
125 |
public final Content indexLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
126 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
127 |
public final Content helpLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
128 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
129 |
public final Content seeLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
130 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
131 |
public final Content descriptionLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
132 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
133 |
public final Content prevpackageLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
134 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
135 |
public final Content nextpackageLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
136 |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
137 |
public final Content prevprofileLabel; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
138 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
139 |
public final Content nextprofileLabel; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
140 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
141 |
public final Content packagesLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
142 |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
143 |
public final Content profilesLabel; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
144 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
145 |
public final Content methodDetailsLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
146 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
147 |
public final Content annotationTypeDetailsLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
148 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
149 |
public final Content fieldDetailsLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
150 |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
151 |
public final Content propertyDetailsLabel; |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
152 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
153 |
public final Content constructorDetailsLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
154 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
155 |
public final Content enumConstantsDetailsLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
156 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
157 |
public final Content specifiedByLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
158 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
159 |
public final Content overridesLabel; |
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 |
public final Content descfrmClassLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
162 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
163 |
public final Content descfrmInterfaceLabel; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
164 |
|
14266
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
165 |
private final Writer writer; |
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
166 |
|
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
167 |
private Content script; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
168 |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
169 |
/** |
10 | 170 |
* Constructor. |
171 |
* |
|
172 |
* @param path The directory path to be created for this file |
|
173 |
* or null if none to be created. |
|
174 |
* @exception IOException Exception raised by the FileWriter is passed on |
|
175 |
* to next level. |
|
14259 | 176 |
* @exception UnsupportedEncodingException Exception raised by the |
10 | 177 |
* OutputStreamWriter is passed on to next level. |
178 |
*/ |
|
14366
af625e568667
8001929: fix doclint errors in langtools doc comments
jjg
parents:
14357
diff
changeset
|
179 |
public HtmlWriter(Configuration configuration, DocPath path) |
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14266
diff
changeset
|
180 |
throws IOException, UnsupportedEncodingException { |
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14366
diff
changeset
|
181 |
writer = DocFile.createFileForOutput(configuration, path).openWriter(); |
10 | 182 |
this.configuration = configuration; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1863
diff
changeset
|
183 |
this.memberDetailsListPrinted = false; |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
184 |
profileTableHeader = new String[] { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
185 |
configuration.getText("doclet.Profile"), |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
186 |
configuration.getText("doclet.Description") |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
187 |
}; |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
188 |
packageTableHeader = new String[] { |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
189 |
configuration.getText("doclet.Package"), |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
190 |
configuration.getText("doclet.Description") |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
191 |
}; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
192 |
useTableSummary = configuration.getText("doclet.Use_Table_Summary", |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
193 |
configuration.getText("doclet.packages")); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
194 |
modifierTypeHeader = configuration.getText("doclet.0_and_1", |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
195 |
configuration.getText("doclet.Modifier"), |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
196 |
configuration.getText("doclet.Type")); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
197 |
overviewLabel = getResource("doclet.Overview"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
198 |
defaultPackageLabel = new RawHtml( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
199 |
DocletConstants.DEFAULT_PACKAGE_NAME); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
200 |
packageLabel = getResource("doclet.Package"); |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
201 |
profileLabel = getResource("doclet.Profile"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
202 |
useLabel = getResource("doclet.navClassUse"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
203 |
prevLabel = getResource("doclet.Prev"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
204 |
nextLabel = getResource("doclet.Next"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
205 |
prevclassLabel = getResource("doclet.Prev_Class"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
206 |
nextclassLabel = getResource("doclet.Next_Class"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
207 |
summaryLabel = getResource("doclet.Summary"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
208 |
detailLabel = getResource("doclet.Detail"); |
9067
c0b85430843d
7025314: NLS: translatability violation on standard.properties
bpatel
parents:
7681
diff
changeset
|
209 |
framesLabel = getResource("doclet.Frames"); |
c0b85430843d
7025314: NLS: translatability violation on standard.properties
bpatel
parents:
7681
diff
changeset
|
210 |
noframesLabel = getResource("doclet.No_Frames"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
211 |
treeLabel = getResource("doclet.Tree"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
212 |
classLabel = getResource("doclet.Class"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
213 |
deprecatedLabel = getResource("doclet.navDeprecated"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
214 |
deprecatedPhrase = getResource("doclet.Deprecated"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
215 |
allclassesLabel = getResource("doclet.All_Classes"); |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
216 |
allpackagesLabel = getResource("doclet.All_Packages"); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
217 |
allprofilesLabel = getResource("doclet.All_Profiles"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
218 |
indexLabel = getResource("doclet.Index"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
219 |
helpLabel = getResource("doclet.Help"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
220 |
seeLabel = getResource("doclet.See"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
221 |
descriptionLabel = getResource("doclet.Description"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
222 |
prevpackageLabel = getResource("doclet.Prev_Package"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
223 |
nextpackageLabel = getResource("doclet.Next_Package"); |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
224 |
prevprofileLabel = getResource("doclet.Prev_Profile"); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
225 |
nextprofileLabel = getResource("doclet.Next_Profile"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
226 |
packagesLabel = getResource("doclet.Packages"); |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14549
diff
changeset
|
227 |
profilesLabel = getResource("doclet.Profiles"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
228 |
methodDetailsLabel = getResource("doclet.Method_Detail"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
229 |
annotationTypeDetailsLabel = getResource("doclet.Annotation_Type_Member_Detail"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
230 |
fieldDetailsLabel = getResource("doclet.Field_Detail"); |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15723
diff
changeset
|
231 |
propertyDetailsLabel = getResource("doclet.Property_Detail"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
232 |
constructorDetailsLabel = getResource("doclet.Constructor_Detail"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
233 |
enumConstantsDetailsLabel = getResource("doclet.Enum_Constant_Detail"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
234 |
specifiedByLabel = getResource("doclet.Specified_By"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
235 |
overridesLabel = getResource("doclet.Overrides"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
236 |
descfrmClassLabel = getResource("doclet.Description_From_Class"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
237 |
descfrmInterfaceLabel = getResource("doclet.Description_From_Interface"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
238 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
239 |
|
14266
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
240 |
public void write(Content c) throws IOException { |
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
241 |
c.write(writer, true); |
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
242 |
} |
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
243 |
|
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
244 |
public void close() throws IOException { |
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
245 |
writer.close(); |
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
246 |
} |
69453558960d
8000673: remove dead code from HtmlWriter and subtypes
jjg
parents:
14265
diff
changeset
|
247 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
248 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
249 |
* Get the configuration string as a content. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
250 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
251 |
* @param key the key to look for in the configuration file |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
252 |
* @return a content tree for the text |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
253 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
254 |
public Content getResource(String key) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
255 |
return new StringContent(configuration.getText(key)); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
256 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
257 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
258 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
259 |
* Get the configuration string as a content. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
260 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
261 |
* @param key the key to look for in the configuration file |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
262 |
* @param a1 string argument added to configuration text |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
263 |
* @return a content tree for the text |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
264 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
265 |
public Content getResource(String key, String a1) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
266 |
return new RawHtml(configuration.getText(key, a1)); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
267 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
268 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
269 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
270 |
* Get the configuration string as a content. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
271 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
272 |
* @param key the key to look for in the configuration file |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
273 |
* @param a1 string argument added to configuration text |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
274 |
* @param a2 string argument added to configuration text |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
275 |
* @return a content tree for the text |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
276 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
277 |
public Content getResource(String key, String a1, String a2) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
278 |
return new RawHtml(configuration.getText(key, a1, a2)); |
10 | 279 |
} |
280 |
||
281 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
282 |
* Returns an HtmlTree for the SCRIPT tag. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
283 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
284 |
* @return an HtmlTree for the SCRIPT tag |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
285 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
286 |
protected HtmlTree getWinTitleScript(){ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
287 |
HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
288 |
if(winTitle != null && winTitle.length() > 0) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
289 |
script.addAttr(HtmlAttr.TYPE, "text/javascript"); |
7641
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
290 |
String scriptCode = "<!--" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
291 |
" if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
292 |
" parent.document.title=\"" + winTitle + "\";" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
293 |
" }" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
294 |
"//-->" + DocletConstants.NL; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
295 |
RawHtml scriptContent = new RawHtml(scriptCode); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
296 |
script.addContent(scriptContent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
297 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
298 |
return script; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
299 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
300 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
301 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
302 |
* Returns a content tree for the SCRIPT tag for the main page(index.html). |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
303 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
304 |
* @return a content for the SCRIPT tag |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
305 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
306 |
protected Content getFramesetJavaScript(){ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
307 |
HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
308 |
script.addAttr(HtmlAttr.TYPE, "text/javascript"); |
7641
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
309 |
String scriptCode = DocletConstants.NL + " targetPage = \"\" + window.location.search;" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
310 |
" if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
311 |
" targetPage = targetPage.substring(1);" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
312 |
" if (targetPage.indexOf(\":\") != -1)" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
313 |
" targetPage = \"undefined\";" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
314 |
" function loadFrames() {" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
315 |
" if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
316 |
" top.classFrame.location = top.targetPage;" + DocletConstants.NL + |
8b552db25f99
7006270: Several javadoc regression tests are failing on windows
bpatel
parents:
7614
diff
changeset
|
317 |
" }" + DocletConstants.NL; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
318 |
RawHtml scriptContent = new RawHtml(scriptCode); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
319 |
script.addContent(scriptContent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
320 |
return script; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
321 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
322 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
323 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
324 |
* Returns an HtmlTree for the BODY tag. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
325 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
326 |
* @param includeScript set true if printing windowtitle script |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
327 |
* @param title title for the window |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
328 |
* @return an HtmlTree for the BODY tag |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
329 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
330 |
public HtmlTree getBody(boolean includeScript, String title) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
331 |
HtmlTree body = new HtmlTree(HtmlTag.BODY); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
332 |
// Set window title string which is later printed |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
333 |
this.winTitle = title; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
334 |
// Don't print windowtitle script for overview-frame, allclasses-frame |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
335 |
// and package-frame |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
336 |
if (includeScript) { |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
337 |
this.script = getWinTitleScript(); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
338 |
body.addContent(script); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
339 |
Content noScript = HtmlTree.NOSCRIPT( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
340 |
HtmlTree.DIV(getResource("doclet.No_Script_Message"))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
341 |
body.addContent(noScript); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
342 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
343 |
return body; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
344 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
345 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
346 |
/** |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
347 |
* Generated javascript variables for the document. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
348 |
* |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
349 |
* @param typeMap map comprising of method and type relationship |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
350 |
* @param methodTypes set comprising of all methods types for this class |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
351 |
*/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
352 |
public void generateMethodTypesScript(Map<String,Integer> typeMap, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
353 |
Set<MethodTypes> methodTypes) { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
354 |
String sep = ""; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
355 |
StringBuilder vars = new StringBuilder("var methods = {"); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
356 |
for (Map.Entry<String,Integer> entry : typeMap.entrySet()) { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
357 |
vars.append(sep); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
358 |
sep = ","; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
359 |
vars.append("\""); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
360 |
vars.append(entry.getKey()); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
361 |
vars.append("\":"); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
362 |
vars.append(entry.getValue()); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
363 |
} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
364 |
vars.append("};").append(DocletConstants.NL); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
365 |
sep = ""; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
366 |
vars.append("var tabs = {"); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
367 |
for (MethodTypes entry : methodTypes) { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
368 |
vars.append(sep); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
369 |
sep = ","; |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
370 |
vars.append(entry.value()).append(":"); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
371 |
vars.append("[").append("\"").append(entry.tabId()); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
372 |
vars.append("\"").append(sep).append("\"").append(entry.text()).append("\"]"); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
373 |
} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
374 |
vars.append("};").append(DocletConstants.NL); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
375 |
addStyles(HtmlStyle.altColor, vars); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
376 |
addStyles(HtmlStyle.rowColor, vars); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
377 |
addStyles(HtmlStyle.tableTab, vars); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
378 |
addStyles(HtmlStyle.activeTableTab, vars); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
379 |
script.addContent(new RawHtml(vars.toString())); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
380 |
} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
381 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
382 |
/** |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
383 |
* Adds javascript style variables to the document. |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
384 |
* |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
385 |
* @param style style to be added as a javascript variable |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
386 |
* @param vars variable string to which the style variable will be added |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
387 |
*/ |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
388 |
public void addStyles(HtmlStyle style, StringBuilder vars) { |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
389 |
vars.append("var ").append(style).append(" = \"").append(style) |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
390 |
.append("\";").append(DocletConstants.NL); |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
391 |
} |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
392 |
|
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14368
diff
changeset
|
393 |
/** |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
394 |
* Returns an HtmlTree for the TITLE tag. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
395 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
396 |
* @return an HtmlTree for the TITLE tag |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
397 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
398 |
public HtmlTree getTitle() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
399 |
HtmlTree title = HtmlTree.TITLE(new StringContent(winTitle)); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
400 |
return title; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
401 |
} |
10 | 402 |
|
403 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
404 |
* Return, text passed, with Italics <i> and </i> tags, surrounding it. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
405 |
* So if the text passed is "Hi", then string returned will be "<i>Hi</i>". |
10 | 406 |
* |
407 |
* @param text String to be printed in between <I> and </I> tags. |
|
408 |
*/ |
|
409 |
public String italicsText(String text) { |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
410 |
return "<i>" + text + "</i>"; |
10 | 411 |
} |
412 |
||
413 |
public String codeText(String text) { |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
414 |
return "<code>" + text + "</code>"; |
10 | 415 |
} |
416 |
||
417 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
418 |
* Return "&nbsp;", non-breaking space. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
419 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
420 |
public Content getSpace() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
421 |
return RawHtml.nbsp; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
422 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
423 |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
424 |
/* |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
425 |
* Returns a header for Modifier and Type column of a table. |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
426 |
*/ |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
427 |
public String getModifierTypeHeader() { |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
428 |
return modifierTypeHeader; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2223
diff
changeset
|
429 |
} |
10 | 430 |
} |