src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java
equal
deleted
inserted
replaced
175 public DocCommentDuo getHtmlCommentDuo(Element e) { |
175 public DocCommentDuo getHtmlCommentDuo(Element e) { |
176 FileObject fo = null; |
176 FileObject fo = null; |
177 PackageElement pe = null; |
177 PackageElement pe = null; |
178 switch (e.getKind()) { |
178 switch (e.getKind()) { |
179 case OTHER: |
179 case OTHER: |
180 fo = configuration.getOverviewPath(); |
180 if (e instanceof DocletElement) { |
181 pe = configuration.workArounds.getUnnamedPackage(); |
181 DocletElement de = (DocletElement)e; |
|
182 fo = de.getFileObject(); |
|
183 pe = de.getPackageElement(); |
|
184 } |
182 break; |
185 break; |
183 case PACKAGE: |
186 case PACKAGE: |
184 fo = configuration.workArounds.getJavaFileObject((PackageElement)e); |
187 fo = configuration.workArounds.getJavaFileObject((PackageElement)e); |
185 pe = (PackageElement)e; |
188 pe = (PackageElement)e; |
186 break; |
189 break; |
207 return text; |
210 return text; |
208 } |
211 } |
209 }); |
212 }); |
210 } |
213 } |
211 |
214 |
212 public void setDocCommentTree(Element element, List<DocTree> fullBody, |
215 public void setDocCommentTree(Element element, List<? extends DocTree> fullBody, |
213 List<DocTree> blockTags, Utils utils) { |
216 List<? extends DocTree> blockTags, Utils utils) { |
214 DocCommentTree docTree = treeFactory.newDocCommentTree(fullBody, blockTags); |
217 DocCommentTree docTree = treeFactory.newDocCommentTree(fullBody, blockTags); |
215 dcTreesMap.put(element, new DocCommentDuo(null, docTree)); |
218 dcTreesMap.put(element, new DocCommentDuo(null, docTree)); |
216 // There maybe an entry with the original comments usually null, |
219 // A method having null comment (no comment) that might need to be replaced |
217 // therefore remove that entry if it exists, and allow a new one |
220 // with a synthetic comment, remove such a comment from the cache. |
218 // to be reestablished. |
|
219 utils.removeCommentHelper(element); |
221 utils.removeCommentHelper(element); |
220 } |
222 } |
221 |
223 |
222 /** |
224 /** |
223 * A simplistic container to transport a TreePath, DocCommentTree pair. |
225 * A simplistic container to transport a TreePath, DocCommentTree pair. |