langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Sat Apr 30 16:57:18 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Mon May 02 02:13:02 2011 -0700
@@ -114,11 +114,12 @@
Content packageHead = new RawHtml(heading);
tHeading.addContent(packageHead);
div.addContent(tHeading);
+ addDeprecationInfo(div);
if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) {
- HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV);
- subTitleDiv.addStyle(HtmlStyle.subTitle);
- addSummaryComment(packageDoc, subTitleDiv);
- div.addContent(subTitleDiv);
+ HtmlTree docSummaryDiv = new HtmlTree(HtmlTag.DIV);
+ docSummaryDiv.addStyle(HtmlStyle.docSummary);
+ addSummaryComment(packageDoc, docSummaryDiv);
+ div.addContent(docSummaryDiv);
Content space = getSpace();
Content descLink = getHyperLink("", "package_description",
descriptionLabel, "", "");
@@ -139,6 +140,28 @@
}
/**
+ * Add the package deprecation information to the documentation tree.
+ *
+ * @param div the content tree to which the deprecation information will be added
+ */
+ public void addDeprecationInfo(Content div) {
+ Tag[] deprs = packageDoc.tags("deprecated");
+ if (Util.isDeprecated(packageDoc)) {
+ HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
+ deprDiv.addStyle(HtmlStyle.deprecatedContent);
+ Content deprPhrase = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
+ deprDiv.addContent(deprPhrase);
+ if (deprs.length > 0) {
+ Tag[] commentTags = deprs[0].inlineTags();
+ if (commentTags.length > 0) {
+ addInlineDeprecatedComment(packageDoc, deprs[0], deprDiv);
+ }
+ }
+ div.addContent(deprDiv);
+ }
+ }
+
+ /**
* {@inheritDoc}
*/
public Content getSummaryHeader() {