127 public void build() throws DocletException { |
122 public void build() throws DocletException { |
128 if (writer == null) { |
123 if (writer == null) { |
129 //Doclet does not support this output. |
124 //Doclet does not support this output. |
130 return; |
125 return; |
131 } |
126 } |
132 buildConstantSummary(contentTree); |
127 buildConstantSummary(); |
133 } |
128 } |
134 |
129 |
135 /** |
130 /** |
136 * Build the constant summary. |
131 * Build the constant summary. |
137 * |
132 * |
138 * @param contentTree the content tree to which the documentation will be added |
|
139 * @throws DocletException if there is a problem while building the documentation |
133 * @throws DocletException if there is a problem while building the documentation |
140 */ |
134 */ |
141 protected void buildConstantSummary(Content contentTree) throws DocletException { |
135 protected void buildConstantSummary() throws DocletException { |
142 contentTree = writer.getHeader(); |
136 Content contentTree = writer.getHeader(); |
143 |
137 |
144 buildContents(contentTree); |
138 buildContents(); |
145 buildConstantSummaries(contentTree); |
139 buildConstantSummaries(); |
146 |
140 |
147 writer.addFooter(contentTree); |
141 writer.addFooter(); |
148 writer.printDocument(contentTree); |
142 writer.printDocument(contentTree); |
149 } |
143 } |
150 |
144 |
151 /** |
145 /** |
152 * Build the list of packages. |
146 * Build the list of packages. |
153 * |
147 */ |
154 * @param contentTree the content tree to which the content list will be added |
148 protected void buildContents() { |
155 */ |
|
156 protected void buildContents(Content contentTree) { |
|
157 Content contentListTree = writer.getContentsHeader(); |
149 Content contentListTree = writer.getContentsHeader(); |
158 printedPackageHeaders.clear(); |
150 printedPackageHeaders.clear(); |
159 for (PackageElement pkg : configuration.packages) { |
151 for (PackageElement pkg : configuration.packages) { |
160 if (hasConstantField(pkg) && !hasPrintedPackageIndex(pkg)) { |
152 if (hasConstantField(pkg) && !hasPrintedPackageIndex(pkg)) { |
161 writer.addLinkToPackageContent(pkg, printedPackageHeaders, contentListTree); |
153 writer.addLinkToPackageContent(pkg, printedPackageHeaders, contentListTree); |
162 } |
154 } |
163 } |
155 } |
164 writer.addContentsList(contentTree, contentListTree); |
156 writer.addContentsList(contentListTree); |
165 } |
157 } |
166 |
158 |
167 /** |
159 /** |
168 * Build the summary for each documented package. |
160 * Build the summary for each documented package. |
169 * |
161 * |
170 * @param contentTree the tree to which the summaries will be added |
|
171 * @throws DocletException if there is a problem while building the documentation |
162 * @throws DocletException if there is a problem while building the documentation |
172 */ |
163 */ |
173 protected void buildConstantSummaries(Content contentTree) throws DocletException { |
164 protected void buildConstantSummaries() throws DocletException { |
174 printedPackageHeaders.clear(); |
165 printedPackageHeaders.clear(); |
175 Content summariesTree = writer.getConstantSummaries(); |
166 Content summariesTree = writer.getConstantSummaries(); |
176 for (PackageElement aPackage : configuration.packages) { |
167 for (PackageElement aPackage : configuration.packages) { |
177 if (hasConstantField(aPackage)) { |
168 if (hasConstantField(aPackage)) { |
178 currentPackage = aPackage; |
169 currentPackage = aPackage; |