57 |
57 |
58 /** |
58 /** |
59 * The doclet specific writer that will output the result. |
59 * The doclet specific writer that will output the result. |
60 */ |
60 */ |
61 private final PackageSummaryWriter packageWriter; |
61 private final PackageSummaryWriter packageWriter; |
62 |
|
63 /** |
|
64 * The content that will be added to the package summary documentation tree. |
|
65 */ |
|
66 private Content contentTree; |
|
67 |
62 |
68 /** |
63 /** |
69 * Construct a new PackageSummaryBuilder. |
64 * Construct a new PackageSummaryBuilder. |
70 * |
65 * |
71 * @param context the build context. |
66 * @param context the build context. |
105 public void build() throws DocletException { |
100 public void build() throws DocletException { |
106 if (packageWriter == null) { |
101 if (packageWriter == null) { |
107 //Doclet does not support this output. |
102 //Doclet does not support this output. |
108 return; |
103 return; |
109 } |
104 } |
110 buildPackageDoc(contentTree); |
105 buildPackageDoc(); |
111 } |
106 } |
112 |
107 |
113 /** |
108 /** |
114 * Build the package documentation. |
109 * Build the package documentation. |
115 * |
110 * |
116 * @param contentTree the content tree to which the documentation will be added |
111 * @throws DocletException if there is a problem while building the documentation |
117 * @throws DocletException if there is a problem while building the documentation |
112 */ |
118 */ |
113 protected void buildPackageDoc() throws DocletException { |
119 protected void buildPackageDoc(Content contentTree) throws DocletException { |
114 Content contentTree = packageWriter.getPackageHeader(utils.getPackageName(packageElement)); |
120 contentTree = packageWriter.getPackageHeader(utils.getPackageName(packageElement)); |
115 |
121 |
116 buildContent(); |
122 buildContent(contentTree); |
117 |
123 |
118 packageWriter.addPackageFooter(); |
124 packageWriter.addPackageFooter(contentTree); |
|
125 packageWriter.printDocument(contentTree); |
119 packageWriter.printDocument(contentTree); |
126 DocFilesHandler docFilesHandler = configuration |
120 DocFilesHandler docFilesHandler = configuration |
127 .getWriterFactory() |
121 .getWriterFactory() |
128 .getDocFilesHandler(packageElement); |
122 .getDocFilesHandler(packageElement); |
129 docFilesHandler.copyDocFiles(); |
123 docFilesHandler.copyDocFiles(); |
130 } |
124 } |
131 |
125 |
132 /** |
126 /** |
133 * Build the content for the package. |
127 * Build the content for the package. |
134 * |
128 * |
135 * @param contentTree the content tree to which the package contents |
129 * @throws DocletException if there is a problem while building the documentation |
136 * will be added |
130 */ |
137 * @throws DocletException if there is a problem while building the documentation |
131 protected void buildContent() throws DocletException { |
138 */ |
|
139 protected void buildContent(Content contentTree) throws DocletException { |
|
140 Content packageContentTree = packageWriter.getContentHeader(); |
132 Content packageContentTree = packageWriter.getContentHeader(); |
141 |
133 |
142 buildPackageDescription(packageContentTree); |
134 buildPackageDescription(packageContentTree); |
143 buildPackageTags(packageContentTree); |
135 buildPackageTags(packageContentTree); |
144 buildSummary(packageContentTree); |
136 buildSummary(packageContentTree); |
145 |
137 |
146 packageWriter.addPackageContent(contentTree, packageContentTree); |
138 packageWriter.addPackageContent(packageContentTree); |
147 } |
139 } |
148 |
140 |
149 /** |
141 /** |
150 * Build the package summary. |
142 * Build the package summary. |
151 * |
143 * |