author | bpatel |
Fri, 11 Mar 2011 15:39:51 -0800 | |
changeset 8841 | b4422fa4f2e6 |
parent 7681 | 1f0819a3341f |
child 9606 | e5a619cb5dd3 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
8841
b4422fa4f2e6
7006178: findbugs high priority issues in new javadoc
bpatel
parents:
7681
diff
changeset
|
2 |
* Copyright (c) 1998, 2011, 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.*; |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
30 |
import com.sun.javadoc.*; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
31 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
32 |
import com.sun.tools.doclets.formats.html.markup.*; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
33 |
import com.sun.tools.doclets.internal.toolkit.*; |
10 | 34 |
|
35 |
/** |
|
36 |
* Generate class usage information. |
|
37 |
* |
|
38 |
* @author Robert G. Field |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
39 |
* @author Bhavesh Patel (Modified) |
10 | 40 |
*/ |
41 |
public class ClassUseWriter extends SubWriterHolderWriter { |
|
42 |
||
43 |
final ClassDoc classdoc; |
|
1789
7ac8c0815000
6765045: Remove rawtypes warnings from langtools
mcimadamore
parents:
1787
diff
changeset
|
44 |
Set<PackageDoc> pkgToPackageAnnotations = null; |
868 | 45 |
final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter; |
46 |
final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations; |
|
47 |
final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter; |
|
48 |
final Map<String,List<ProgramElementDoc>> pkgToMethodArgTypeParameter; |
|
49 |
final Map<String,List<ProgramElementDoc>> pkgToMethodReturnTypeParameter; |
|
50 |
final Map<String,List<ProgramElementDoc>> pkgToMethodAnnotations; |
|
51 |
final Map<String,List<ProgramElementDoc>> pkgToMethodParameterAnnotations; |
|
52 |
final Map<String,List<ProgramElementDoc>> pkgToFieldTypeParameter; |
|
53 |
final Map<String,List<ProgramElementDoc>> pkgToFieldAnnotations; |
|
54 |
final Map<String,List<ProgramElementDoc>> pkgToSubclass; |
|
55 |
final Map<String,List<ProgramElementDoc>> pkgToSubinterface; |
|
56 |
final Map<String,List<ProgramElementDoc>> pkgToImplementingClass; |
|
57 |
final Map<String,List<ProgramElementDoc>> pkgToField; |
|
58 |
final Map<String,List<ProgramElementDoc>> pkgToMethodReturn; |
|
59 |
final Map<String,List<ProgramElementDoc>> pkgToMethodArgs; |
|
60 |
final Map<String,List<ProgramElementDoc>> pkgToMethodThrows; |
|
61 |
final Map<String,List<ProgramElementDoc>> pkgToConstructorAnnotations; |
|
62 |
final Map<String,List<ProgramElementDoc>> pkgToConstructorParameterAnnotations; |
|
63 |
final Map<String,List<ProgramElementDoc>> pkgToConstructorArgs; |
|
64 |
final Map<String,List<ProgramElementDoc>> pkgToConstructorArgTypeParameter; |
|
65 |
final Map<String,List<ProgramElementDoc>> pkgToConstructorThrows; |
|
66 |
final SortedSet<PackageDoc> pkgSet; |
|
10 | 67 |
final MethodWriterImpl methodSubWriter; |
68 |
final ConstructorWriterImpl constrSubWriter; |
|
69 |
final FieldWriterImpl fieldSubWriter; |
|
70 |
final NestedClassWriterImpl classSubWriter; |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
71 |
// Summary for various use tables. |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
72 |
final String classUseTableSummary; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
73 |
final String subclassUseTableSummary; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
74 |
final String subinterfaceUseTableSummary; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
75 |
final String fieldUseTableSummary; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
76 |
final String methodUseTableSummary; |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
77 |
final String constructorUseTableSummary; |
10 | 78 |
|
79 |
||
80 |
/** |
|
81 |
* Constructor. |
|
82 |
* |
|
83 |
* @param filename the file to be generated. |
|
84 |
* @throws IOException |
|
85 |
* @throws DocletAbortException |
|
86 |
*/ |
|
87 |
public ClassUseWriter(ConfigurationImpl configuration, |
|
88 |
ClassUseMapper mapper, String path, |
|
89 |
String filename, String relpath, |
|
90 |
ClassDoc classdoc) throws IOException { |
|
91 |
super(configuration, path, filename, relpath); |
|
92 |
this.classdoc = classdoc; |
|
93 |
if (mapper.classToPackageAnnotations.containsKey(classdoc.qualifiedName())) |
|
868 | 94 |
pkgToPackageAnnotations = new HashSet<PackageDoc>(mapper.classToPackageAnnotations.get(classdoc.qualifiedName())); |
10 | 95 |
configuration.currentcd = classdoc; |
868 | 96 |
this.pkgSet = new TreeSet<PackageDoc>(); |
10 | 97 |
this.pkgToClassTypeParameter = pkgDivide(mapper.classToClassTypeParam); |
98 |
this.pkgToClassAnnotations = pkgDivide(mapper.classToClassAnnotations); |
|
99 |
this.pkgToMethodTypeParameter = pkgDivide(mapper.classToExecMemberDocTypeParam); |
|
100 |
this.pkgToMethodArgTypeParameter = pkgDivide(mapper.classToExecMemberDocArgTypeParam); |
|
101 |
this.pkgToFieldTypeParameter = pkgDivide(mapper.classToFieldDocTypeParam); |
|
102 |
this.pkgToFieldAnnotations = pkgDivide(mapper.annotationToFieldDoc); |
|
103 |
this.pkgToMethodReturnTypeParameter = pkgDivide(mapper.classToExecMemberDocReturnTypeParam); |
|
104 |
this.pkgToMethodAnnotations = pkgDivide(mapper.classToExecMemberDocAnnotations); |
|
105 |
this.pkgToMethodParameterAnnotations = pkgDivide(mapper.classToExecMemberDocParamAnnotation); |
|
106 |
this.pkgToSubclass = pkgDivide(mapper.classToSubclass); |
|
107 |
this.pkgToSubinterface = pkgDivide(mapper.classToSubinterface); |
|
108 |
this.pkgToImplementingClass = pkgDivide(mapper.classToImplementingClass); |
|
109 |
this.pkgToField = pkgDivide(mapper.classToField); |
|
110 |
this.pkgToMethodReturn = pkgDivide(mapper.classToMethodReturn); |
|
111 |
this.pkgToMethodArgs = pkgDivide(mapper.classToMethodArgs); |
|
112 |
this.pkgToMethodThrows = pkgDivide(mapper.classToMethodThrows); |
|
113 |
this.pkgToConstructorAnnotations = pkgDivide(mapper.classToConstructorAnnotations); |
|
114 |
this.pkgToConstructorParameterAnnotations = pkgDivide(mapper.classToConstructorParamAnnotation); |
|
115 |
this.pkgToConstructorArgs = pkgDivide(mapper.classToConstructorArgs); |
|
116 |
this.pkgToConstructorArgTypeParameter = pkgDivide(mapper.classToConstructorDocArgTypeParam); |
|
117 |
this.pkgToConstructorThrows = pkgDivide(mapper.classToConstructorThrows); |
|
118 |
//tmp test |
|
119 |
if (pkgSet.size() > 0 && |
|
120 |
mapper.classToPackage.containsKey(classdoc.qualifiedName()) && |
|
121 |
!pkgSet.equals(mapper.classToPackage.get(classdoc.qualifiedName()))) { |
|
122 |
configuration.root.printWarning("Internal error: package sets don't match: " + pkgSet + " with: " + |
|
123 |
mapper.classToPackage.get(classdoc.qualifiedName())); |
|
124 |
} |
|
125 |
methodSubWriter = new MethodWriterImpl(this); |
|
126 |
constrSubWriter = new ConstructorWriterImpl(this); |
|
127 |
fieldSubWriter = new FieldWriterImpl(this); |
|
128 |
classSubWriter = new NestedClassWriterImpl(this); |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
129 |
classUseTableSummary = 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:
1789
diff
changeset
|
130 |
configuration.getText("doclet.classes")); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
131 |
subclassUseTableSummary = 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:
1789
diff
changeset
|
132 |
configuration.getText("doclet.subclasses")); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
133 |
subinterfaceUseTableSummary = 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:
1789
diff
changeset
|
134 |
configuration.getText("doclet.subinterfaces")); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
135 |
fieldUseTableSummary = 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:
1789
diff
changeset
|
136 |
configuration.getText("doclet.fields")); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
137 |
methodUseTableSummary = 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:
1789
diff
changeset
|
138 |
configuration.getText("doclet.methods")); |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1789
diff
changeset
|
139 |
constructorUseTableSummary = 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:
1789
diff
changeset
|
140 |
configuration.getText("doclet.constructors")); |
10 | 141 |
} |
142 |
||
143 |
/** |
|
144 |
* Write out class use pages. |
|
145 |
* @throws DocletAbortException |
|
146 |
*/ |
|
147 |
public static void generate(ConfigurationImpl configuration, |
|
148 |
ClassTree classtree) { |
|
149 |
ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree); |
|
150 |
ClassDoc[] classes = configuration.root.classes(); |
|
151 |
for (int i = 0; i < classes.length; i++) { |
|
152 |
ClassUseWriter.generate(configuration, mapper, classes[i]); |
|
153 |
} |
|
154 |
PackageDoc[] pkgs = configuration.packages; |
|
155 |
for (int i = 0; i < pkgs.length; i++) { |
|
156 |
PackageUseWriter.generate(configuration, mapper, pkgs[i]); |
|
157 |
} |
|
158 |
} |
|
159 |
||
868 | 160 |
private Map<String,List<ProgramElementDoc>> pkgDivide(Map<String,? extends List<? extends ProgramElementDoc>> classMap) { |
161 |
Map<String,List<ProgramElementDoc>> map = new HashMap<String,List<ProgramElementDoc>>(); |
|
162 |
List<? extends ProgramElementDoc> list= classMap.get(classdoc.qualifiedName()); |
|
10 | 163 |
if (list != null) { |
164 |
Collections.sort(list); |
|
868 | 165 |
Iterator<? extends ProgramElementDoc> it = list.iterator(); |
10 | 166 |
while (it.hasNext()) { |
868 | 167 |
ProgramElementDoc doc = it.next(); |
10 | 168 |
PackageDoc pkg = doc.containingPackage(); |
169 |
pkgSet.add(pkg); |
|
868 | 170 |
List<ProgramElementDoc> inPkg = map.get(pkg.name()); |
10 | 171 |
if (inPkg == null) { |
868 | 172 |
inPkg = new ArrayList<ProgramElementDoc>(); |
10 | 173 |
map.put(pkg.name(), inPkg); |
174 |
} |
|
175 |
inPkg.add(doc); |
|
176 |
} |
|
177 |
} |
|
178 |
return map; |
|
179 |
} |
|
180 |
||
181 |
/** |
|
182 |
* Generate a class page. |
|
183 |
*/ |
|
184 |
public static void generate(ConfigurationImpl configuration, |
|
185 |
ClassUseMapper mapper, ClassDoc classdoc) { |
|
186 |
ClassUseWriter clsgen; |
|
187 |
String path = DirectoryManager.getDirectoryPath(classdoc. |
|
188 |
containingPackage()); |
|
189 |
if (path.length() > 0) { |
|
190 |
path += File.separator; |
|
191 |
} |
|
192 |
path += "class-use"; |
|
193 |
String filename = classdoc.name() + ".html"; |
|
194 |
String pkgname = classdoc.containingPackage().name(); |
|
195 |
pkgname += (pkgname.length() > 0)? ".class-use": "class-use"; |
|
196 |
String relpath = DirectoryManager.getRelativePath(pkgname); |
|
197 |
try { |
|
198 |
clsgen = new ClassUseWriter(configuration, |
|
199 |
mapper, path, filename, |
|
200 |
relpath, classdoc); |
|
201 |
clsgen.generateClassUseFile(); |
|
202 |
clsgen.close(); |
|
203 |
} catch (IOException exc) { |
|
204 |
configuration.standardmessage. |
|
205 |
error("doclet.exception_encountered", |
|
206 |
exc.toString(), filename); |
|
207 |
throw new DocletAbortException(); |
|
208 |
} |
|
209 |
} |
|
210 |
||
211 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
212 |
* Generate the class use list. |
10 | 213 |
*/ |
214 |
protected void generateClassUseFile() throws IOException { |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
215 |
Content body = getClassUseHeader(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
216 |
HtmlTree div = new HtmlTree(HtmlTag.DIV); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
217 |
div.addStyle(HtmlStyle.classUseContainer); |
10 | 218 |
if (pkgSet.size() > 0) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
219 |
addClassUse(div); |
10 | 220 |
} else { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
221 |
div.addContent(getResource("doclet.ClassUse_No.usage.of.0", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
222 |
classdoc.qualifiedName())); |
10 | 223 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
224 |
body.addContent(div); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
225 |
addNavLinks(false, body); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
226 |
addBottom(body); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
227 |
printHtmlDocument(null, true, body); |
10 | 228 |
} |
229 |
||
7614
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 |
* Add the class use documentation. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
232 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
233 |
* @param contentTree the content tree to which the class use information will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
234 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
235 |
protected void addClassUse(Content contentTree) throws IOException { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
236 |
HtmlTree ul = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
237 |
ul.addStyle(HtmlStyle.blockList); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
238 |
if (configuration.packages.length > 1) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
239 |
addPackageList(ul); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
240 |
addPackageAnnotationList(ul); |
10 | 241 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
242 |
addClassList(ul); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
243 |
contentTree.addContent(ul); |
10 | 244 |
} |
245 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
246 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
247 |
* Add the packages list that use the given class. |
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 |
* @param contentTree the content tree to which the packages list will be added |
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 |
protected void addPackageList(Content contentTree) throws IOException { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
252 |
Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
253 |
getTableCaption(configuration().getText( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
254 |
"doclet.ClassUse_Packages.that.use.0", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
255 |
getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
256 |
false))))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
257 |
table.addContent(getSummaryTableHeader(packageTableHeader, "col")); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
258 |
Content tbody = new HtmlTree(HtmlTag.TBODY); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
259 |
Iterator<PackageDoc> it = pkgSet.iterator(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
260 |
for (int i = 0; it.hasNext(); i++) { |
1789
7ac8c0815000
6765045: Remove rawtypes warnings from langtools
mcimadamore
parents:
1787
diff
changeset
|
261 |
PackageDoc pkg = it.next(); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
262 |
HtmlTree tr = new HtmlTree(HtmlTag.TR); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
263 |
if (i % 2 == 0) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
264 |
tr.addStyle(HtmlStyle.altColor); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
265 |
} else { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
266 |
tr.addStyle(HtmlStyle.rowColor); |
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 |
addPackageUse(pkg, tr); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
269 |
tbody.addContent(tr); |
10 | 270 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
271 |
table.addContent(tbody); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
272 |
Content li = HtmlTree.LI(HtmlStyle.blockList, table); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
273 |
contentTree.addContent(li); |
10 | 274 |
} |
275 |
||
276 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
277 |
* Add the package annotation list. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
278 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
279 |
* @param contentTree the content tree to which the package annotation list will be added |
10 | 280 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
281 |
protected void addPackageAnnotationList(Content contentTree) throws IOException { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
282 |
if ((!classdoc.isAnnotationType()) || |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
283 |
pkgToPackageAnnotations == null || |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
284 |
pkgToPackageAnnotations.size() == 0) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
285 |
return; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
286 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
287 |
Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
288 |
getTableCaption(configuration().getText( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
289 |
"doclet.ClassUse_PackageAnnotation", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
290 |
getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
291 |
false))))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
292 |
table.addContent(getSummaryTableHeader(packageTableHeader, "col")); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
293 |
Content tbody = new HtmlTree(HtmlTag.TBODY); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
294 |
Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
295 |
for (int i = 0; it.hasNext(); i++) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
296 |
PackageDoc pkg = it.next(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
297 |
HtmlTree tr = new HtmlTree(HtmlTag.TR); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
298 |
if (i % 2 == 0) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
299 |
tr.addStyle(HtmlStyle.altColor); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
300 |
} else { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
301 |
tr.addStyle(HtmlStyle.rowColor); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
302 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
303 |
Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
304 |
getPackageLink(pkg, new StringContent(pkg.name()))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
305 |
tr.addContent(tdFirst); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
306 |
HtmlTree tdLast = new HtmlTree(HtmlTag.TD); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
307 |
tdLast.addStyle(HtmlStyle.colLast); |
8841
b4422fa4f2e6
7006178: findbugs high priority issues in new javadoc
bpatel
parents:
7681
diff
changeset
|
308 |
addSummaryComment(pkg, tdLast); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
309 |
tr.addContent(tdLast); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
310 |
tbody.addContent(tr); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
311 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
312 |
table.addContent(tbody); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
313 |
Content li = HtmlTree.LI(HtmlStyle.blockList, table); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
314 |
contentTree.addContent(li); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
315 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
316 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
317 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
318 |
* Add the class list that use the given class. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
319 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
320 |
* @param contentTree the content tree to which the class list will be added |
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 |
protected void addClassList(Content contentTree) throws IOException { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
323 |
HtmlTree ul = new HtmlTree(HtmlTag.UL); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
324 |
ul.addStyle(HtmlStyle.blockList); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
325 |
for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
326 |
PackageDoc pkg = it.next(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
327 |
Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name())); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
328 |
Content link = new RawHtml( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
329 |
configuration.getText("doclet.ClassUse_Uses.of.0.in.1", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
330 |
getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
331 |
classdoc, false)), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
332 |
getPackageLinkString(pkg, Util.getPackageName(pkg), false))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
333 |
Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
334 |
li.addContent(heading); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
335 |
addClassUse(pkg, li); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
336 |
ul.addContent(li); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
337 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
338 |
Content li = HtmlTree.LI(HtmlStyle.blockList, ul); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
339 |
contentTree.addContent(li); |
10 | 340 |
} |
341 |
||
342 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
343 |
* Add the package use information. |
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 |
* @param pkg the package that uses the given class |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
346 |
* @param contentTree the content tree to which the package use information will be added |
10 | 347 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
348 |
protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
349 |
Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
350 |
getHyperLink("", pkg.name(), new StringContent(Util.getPackageName(pkg)))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
351 |
contentTree.addContent(tdFirst); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
352 |
HtmlTree tdLast = new HtmlTree(HtmlTag.TD); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
353 |
tdLast.addStyle(HtmlStyle.colLast); |
8841
b4422fa4f2e6
7006178: findbugs high priority issues in new javadoc
bpatel
parents:
7681
diff
changeset
|
354 |
addSummaryComment(pkg, tdLast); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
355 |
contentTree.addContent(tdLast); |
10 | 356 |
} |
357 |
||
358 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
359 |
* Add the class use information. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
360 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
361 |
* @param pkg the package that uses the given class |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
362 |
* @param contentTree the content tree to which the class use information will be added |
10 | 363 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
364 |
protected void addClassUse(PackageDoc pkg, Content contentTree) throws IOException { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
365 |
String classLink = getLink(new LinkInfoImpl( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
366 |
LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false)); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
367 |
String pkgLink = getPackageLinkString(pkg, Util.getPackageName(pkg), false); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
368 |
classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
369 |
configuration.getText("doclet.ClassUse_Annotation", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
370 |
pkgLink), classUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
371 |
classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
372 |
configuration.getText("doclet.ClassUse_TypeParameter", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
373 |
pkgLink), classUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
374 |
classSubWriter.addUseInfo(pkgToSubclass.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
375 |
configuration.getText("doclet.ClassUse_Subclass", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
376 |
pkgLink), subclassUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
377 |
classSubWriter.addUseInfo(pkgToSubinterface.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
378 |
configuration.getText("doclet.ClassUse_Subinterface", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
379 |
pkgLink), subinterfaceUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
380 |
classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
381 |
configuration.getText("doclet.ClassUse_ImplementingClass", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
382 |
pkgLink), classUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
383 |
fieldSubWriter.addUseInfo(pkgToField.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
384 |
configuration.getText("doclet.ClassUse_Field", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
385 |
pkgLink), fieldUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
386 |
fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
387 |
configuration.getText("doclet.ClassUse_FieldAnnotations", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
388 |
pkgLink), fieldUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
389 |
fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
390 |
configuration.getText("doclet.ClassUse_FieldTypeParameter", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
391 |
pkgLink), fieldUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
392 |
methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
393 |
configuration.getText("doclet.ClassUse_MethodAnnotations", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
394 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
395 |
methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
396 |
configuration.getText("doclet.ClassUse_MethodParameterAnnotations", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
397 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
398 |
methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
399 |
configuration.getText("doclet.ClassUse_MethodTypeParameter", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
400 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
401 |
methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
402 |
configuration.getText("doclet.ClassUse_MethodReturn", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
403 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
404 |
methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
405 |
configuration.getText("doclet.ClassUse_MethodReturnTypeParameter", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
406 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
407 |
methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
408 |
configuration.getText("doclet.ClassUse_MethodArgs", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
409 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
410 |
methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
411 |
configuration.getText("doclet.ClassUse_MethodArgsTypeParameters", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
412 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
413 |
methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
414 |
configuration.getText("doclet.ClassUse_MethodThrows", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
415 |
pkgLink), methodUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
416 |
constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
417 |
configuration.getText("doclet.ClassUse_ConstructorAnnotations", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
418 |
pkgLink), constructorUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
419 |
constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
420 |
configuration.getText("doclet.ClassUse_ConstructorParameterAnnotations", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
421 |
pkgLink), constructorUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
422 |
constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
423 |
configuration.getText("doclet.ClassUse_ConstructorArgs", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
424 |
pkgLink), constructorUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
425 |
constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
426 |
configuration.getText("doclet.ClassUse_ConstructorArgsTypeParameters", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
427 |
pkgLink), constructorUseTableSummary, contentTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
428 |
constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg.name()), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
429 |
configuration.getText("doclet.ClassUse_ConstructorThrows", classLink, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
430 |
pkgLink), constructorUseTableSummary, contentTree); |
10 | 431 |
} |
432 |
||
433 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
434 |
* Get the header for the class use Listing. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
435 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
436 |
* @return a content tree representing the class use header |
10 | 437 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
438 |
protected Content getClassUseHeader() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
439 |
String cltype = configuration.getText(classdoc.isInterface()? |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
440 |
"doclet.Interface":"doclet.Class"); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
441 |
String clname = classdoc.qualifiedName(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
442 |
String title = configuration.getText("doclet.Window_ClassUse_Header", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
443 |
cltype, clname); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
444 |
Content bodyTree = getBody(true, getWindowTitle(title)); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
445 |
addTop(bodyTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
446 |
addNavLinks(true, bodyTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
447 |
Content headContent = getResource("doclet.ClassUse_Title", cltype, clname); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
448 |
Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
449 |
true, HtmlStyle.title, headContent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
450 |
Content div = HtmlTree.DIV(HtmlStyle.header, heading); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
451 |
bodyTree.addContent(div); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
452 |
return bodyTree; |
10 | 453 |
} |
454 |
||
455 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
456 |
* Get this package link. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
457 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
458 |
* @return a content tree for the package link |
10 | 459 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
460 |
protected Content getNavLinkPackage() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
461 |
Content linkContent = getHyperLink("../package-summary.html", "", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
462 |
packageLabel); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
463 |
Content li = HtmlTree.LI(linkContent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
464 |
return li; |
10 | 465 |
} |
466 |
||
467 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
468 |
* Get class page link. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
469 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
470 |
* @return a content tree for the class page link |
10 | 471 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
472 |
protected Content getNavLinkClass() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
473 |
Content linkContent = new RawHtml(getLink(new LinkInfoImpl( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
474 |
LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, "", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
475 |
configuration.getText("doclet.Class"), false))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
476 |
Content li = HtmlTree.LI(linkContent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
477 |
return li; |
10 | 478 |
} |
479 |
||
480 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
481 |
* Get the use link. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
482 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
483 |
* @return a content tree for the use link |
10 | 484 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
485 |
protected Content getNavLinkClassUse() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
486 |
Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
487 |
return li; |
10 | 488 |
} |
489 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
490 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
491 |
* Get the tree link. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
492 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
493 |
* @return a content tree for the tree link |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
494 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
495 |
protected Content getNavLinkTree() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
496 |
Content linkContent = classdoc.containingPackage().isIncluded() ? |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
497 |
getHyperLink("../package-tree.html", "", treeLabel) : |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
498 |
getHyperLink(relativePath + "overview-tree.html", "", treeLabel); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
499 |
Content li = HtmlTree.LI(linkContent); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
500 |
return li; |
10 | 501 |
} |
502 |
} |