diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java index 8ca56915294..e44e4a3509e 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java @@ -413,7 +413,7 @@ public abstract class AbstractMemberWriter { protected void addDeprecatedAPI(List deprmembers, String headingKey, String tableSummary, String[] tableHeader, Content contentTree) { if (deprmembers.size() > 0) { - Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary, writer.getTableCaption(configuration.getResource(headingKey))); table.addContent(writer.getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); @@ -453,7 +453,7 @@ public abstract class AbstractMemberWriter { List members = mems; boolean printedUseTableHeader = false; if (members.size() > 0) { - Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary, writer.getTableCaption(heading)); Content tbody = new HtmlTree(HtmlTag.TBODY); Iterator it = members.iterator(); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java index 2c48f823b1f..75bc023fd99 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java @@ -263,7 +263,7 @@ public class ClassUseWriter extends SubWriterHolderWriter { * @param contentTree the content tree to which the packages list will be added */ protected void addPackageList(Content contentTree) throws IOException { - Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_Packages.that.use.0", getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc @@ -298,7 +298,7 @@ public class ClassUseWriter extends SubWriterHolderWriter { pkgToPackageAnnotations.isEmpty()) { return; } - Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_PackageAnnotation", getLink(new LinkInfoImpl(configuration, diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java index 02dfdb3d7cc..cb9ab3e3078 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java @@ -207,7 +207,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter * @return the table caption and header */ protected Content getClassName(Content classStr) { - Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.constantsSummary, 0, 3, 0, constantsTableSummary, getTableCaption(classStr)); table.addContent(getSummaryTableHeader(constantsTableHeader, "col")); return table; diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java index b3bfdcb1c3c..3bdcf6a3b10 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java @@ -356,7 +356,7 @@ public class HtmlDocletWriter extends HtmlDocWriter { if(classes.length > 0) { Arrays.sort(classes); Content caption = getTableCaption(new RawHtml(label)); - Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0, + Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0, tableSummary, caption); table.addContent(getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); @@ -937,7 +937,7 @@ public class HtmlDocletWriter extends HtmlDocWriter { protected void addPackageDeprecatedAPI(List deprPkgs, String headingKey, String tableSummary, String[] tableHeader, Content contentTree) { if (deprPkgs.size() > 0) { - Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.deprecatedSummary, 0, 3, 0, tableSummary, getTableCaption(configuration.getResource(headingKey))); table.addContent(getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java index 5814c377f16..e2fba89df37 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java @@ -151,7 +151,7 @@ public class PackageUseWriter extends SubWriterHolderWriter { * @param contentTree the content tree to which the package list will be added */ protected void addPackageList(Content contentTree) throws IOException { - Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_Packages.that.use.0", getPackageLink(pkgdoc, Util.getPackageName(pkgdoc))))); @@ -196,7 +196,7 @@ public class PackageUseWriter extends SubWriterHolderWriter { } String tableSummary = configuration.getText("doclet.Use_Table_Summary", configuration.getText("doclet.classes")); - Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, + Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, tableSummary, getTableCaption(configuration.getResource( "doclet.ClassUse_Classes.in.0.used.by.1", getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)), diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java index 16be6c30c5b..f0325b5b953 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java @@ -169,7 +169,7 @@ public class PackageWriterImpl extends HtmlDocletWriter if(classes.length > 0) { Arrays.sort(classes); Content caption = getTableCaption(new RawHtml(label)); - Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0, + Content table = HtmlTree.TABLE(HtmlStyle.typeSummary, 0, 3, 0, tableSummary, caption); table.addContent(getSummaryTableHeader(tableHeader, "col")); Content tbody = new HtmlTree(HtmlTag.TBODY); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java index ce6a0fd053d..4e15a00c14a 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java @@ -92,7 +92,7 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { else { caption = getTableCaption(mw.getCaption()); } - Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, + Content table = HtmlTree.TABLE(HtmlStyle.memberSummary, 0, 3, 0, mw.getTableSummary(), caption); table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(cd), "col")); for (int i = 0; i < tableContents.size(); i++) { diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java index 5bf1c3259fe..fc49d7f1360 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java @@ -48,8 +48,11 @@ public enum HtmlStyle { colFirst, colLast, colOne, + constantsSummary, constantValuesContainer, contentContainer, + deprecatedContent, + deprecatedSummary, description, details, docSummary, @@ -61,11 +64,11 @@ public enum HtmlStyle { inheritance, italic, legalCopy, + memberSummary, nameValue, navBarCell1Rev, navList, overviewSummary, - packageSummary, rowColor, serializedFormContainer, skipNav, @@ -76,9 +79,10 @@ public enum HtmlStyle { subNavList, subTitle, summary, - deprecatedContent, tabEnd, tableTab, title, - topNav; + topNav, + typeSummary, + useSummary; } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java index ce38afe7451..e0badbe9ff6 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java @@ -618,25 +618,6 @@ public class HtmlTree extends Content { return htmltree; } - /** - * Generates a Table tag with border, width and summary attributes and - * some content. - * - * @param border border for the table - * @param width width of the table - * @param summary summary for the table - * @param body content for the table - * @return an HtmlTree object for the TABLE tag - */ - public static HtmlTree TABLE(int border, int width, String summary, - Content body) { - HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body)); - htmltree.addAttr(HtmlAttr.BORDER, Integer.toString(border)); - htmltree.addAttr(HtmlAttr.WIDTH, Integer.toString(width)); - htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary)); - return htmltree; - } - /** * Generates a Table tag with style class, border, cell padding, * cellspacing and summary attributes and some content. @@ -661,22 +642,6 @@ public class HtmlTree extends Content { return htmltree; } - /** - * Generates a Table tag with border, cell padding, - * cellspacing and summary attributes and some content. - * - * @param border border for the table - * @param cellPadding cell padding for the table - * @param cellSpacing cell spacing for the table - * @param summary summary for the table - * @param body content for the table - * @return an HtmlTree object for the TABLE tag - */ - public static HtmlTree TABLE(int border, int cellPadding, - int cellSpacing, String summary, Content body) { - return TABLE(null, border, cellPadding, cellSpacing, summary, body); - } - /** * Generates a TD tag with style class attribute and some content. * diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css index bf1bc9441de..140b86bbccd 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css +++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css @@ -348,27 +348,16 @@ table tr td dl, table tr td dl dt, table tr td dl dd { /* Table styles */ -.contentContainer table, .classUseContainer table, .constantValuesContainer table { +.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary { border-bottom:1px solid #9eadc0; + margin:0 0 12px 0px; width:100%; } -.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { - width:100%; +.overviewSummary, .memberSummary { + padding:0px; } -.contentContainer .description table, .contentContainer .details table { - border-bottom:none; -} -.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ - vertical-align:top; - padding-right:20px; -} -.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, -.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, -.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, -.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { - padding-right:3px; -} -.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { +.overviewSummary caption, .memberSummary caption, .typeSummary caption, +.useSummary caption, .constantsSummary caption, .deprecatedSummary caption { position:relative; text-align:left; background-repeat:no-repeat; @@ -379,10 +368,18 @@ Table styles padding:0px; margin:0px; } -caption a:link, caption a:hover, caption a:active, caption a:visited { +.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link, +.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link, +.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover, +.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover, +.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active, +.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active, +.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited, +.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited { color:#FFFFFF; } -.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { +.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span, +.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span { white-space:nowrap; padding-top:8px; padding-left:8px; @@ -390,7 +387,7 @@ caption a:link, caption a:hover, caption a:active, caption a:visited { float:left; background-image:url(resources/titlebar.gif); } -.contentContainer ul.blockList li.blockList caption span.activeTableTab span { +.memberSummary caption span.activeTableTab span { white-space:nowrap; padding-top:8px; padding-left:8px; @@ -398,7 +395,7 @@ caption a:link, caption a:hover, caption a:active, caption a:visited { float:left; background-image:url(resources/activetitlebar.gif); } -.contentContainer ul.blockList li.blockList caption span.tableTab span { +.memberSummary caption span.tableTab span { white-space:nowrap; padding-top:8px; padding-left:8px; @@ -406,14 +403,15 @@ caption a:link, caption a:hover, caption a:active, caption a:visited { float:left; background-image:url(resources/titlebar.gif); } -.contentContainer ul.blockList li.blockList caption span.tableTab, .contentContainer ul.blockList li.blockList caption span.activeTableTab { +.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab { padding-top:0px; padding-left:0px; background-image:none; float:none; display:inline-block; } -.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { +.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd, +.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd { width:10px; background-image:url(resources/titlebar_end.gif); background-repeat:no-repeat; @@ -421,7 +419,7 @@ caption a:link, caption a:hover, caption a:active, caption a:visited { position:relative; float:left; } -.contentContainer ul.blockList li.blockList .activeTableTab .tabEnd { +.memberSummary .activeTableTab .tabEnd { width:10px; margin-right:5px; background-image:url(resources/activetitlebar_end.gif); @@ -430,7 +428,7 @@ caption a:link, caption a:hover, caption a:active, caption a:visited { position:relative; float:left; } -.contentContainer ul.blockList li.blockList .tableTab .tabEnd { +.memberSummary .tableTab .tabEnd { width:10px; margin-right:5px; background-image:url(resources/titlebar_end.gif); @@ -439,33 +437,23 @@ caption a:link, caption a:hover, caption a:active, caption a:visited { position:relative; float:left; } -ul.blockList ul.blockList li.blockList table { - margin:0 0 12px 0px; - width:100%; -} -.tableSubHeadingColor { - background-color: #EEEEFF; -} -.altColor { - background-color:#eeeeef; -} -.rowColor { - background-color:#ffffff; -} -.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { +.overviewSummary td, .memberSummary td, .typeSummary td, +.useSummary td, .constantsSummary td, .deprecatedSummary td { text-align:left; padding:3px 3px 3px 7px; } -th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { +th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th, +td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{ + vertical-align:top; + padding-right:3px; +} +th.colFirst, th.colLast, th.colOne, .constantsSummary th { background:#dee3e9; border-top:1px solid #9eadc0; border-bottom:1px solid #9eadc0; text-align:left; padding:3px 3px 3px 7px; } -td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { - font-weight:bold; -} td.colFirst, th.colFirst { border-left:1px solid #9eadc0; white-space:nowrap; @@ -477,18 +465,25 @@ td.colOne, th.colOne { border-right:1px solid #9eadc0; border-left:1px solid #9eadc0; } -table.overviewSummary { - padding:0px; - margin-left:0px; -} -table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, -table.overviewSummary td.colOne, table.overviewSummary th.colOne { +.overviewSummary td.colFirst, .overviewSummary th.colFirst, +.overviewSummary td.colOne, .overviewSummary th.colOne, +.memberSummary td.colFirst, .memberSummary th.colFirst, +.memberSummary td.colOne, .memberSummary th.colOne, +.typeSummary td.colFirst{ width:25%; vertical-align:middle; } -table.packageSummary td.colFirst, table.overviewSummary th.colFirst { - width:25%; - vertical-align:middle; +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; } /* Content styles diff --git a/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java b/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java new file mode 100644 index 00000000000..bc03449ea55 --- /dev/null +++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/TestHtmlTableStyles.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8008164 + * @summary Test styles on HTML tables generated by javadoc. + * @author Bhavesh Patel + * @library ../lib/ + * @build JavadocTester TestHtmlTableStyles + * @run main TestHtmlTableStyles + */ + +public class TestHtmlTableStyles extends JavadocTester { + + private static final String BUG_ID = "8008164"; + + //Input for string search tests. + private static final String[][] TEST = { + {BUG_ID + FS + "pkg1" + FS + "TestTable.html", + "" + }, + {BUG_ID + FS + "pkg1" + FS + "TestTable.html", + "
" + }, + {BUG_ID + FS + "pkg1" + FS + "TestTable.html", + "
" + }, + {BUG_ID + FS + "pkg1" + FS + "TestTable.html", + "
" + }, + {BUG_ID + FS + "pkg1" + FS + "package-summary.html", + "
" + }, + {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "TestTable.html", + "
" + }, + {BUG_ID + FS + "overview-summary.html", + "
" + }, + {BUG_ID + FS + "deprecated-list.html", + "
" + }, + {BUG_ID + FS + "constant-values.html", + "
" + }, + }; + + private static final String[] ARGS = new String[] { + "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2" + }; + + /** + * The entry point of the test. + * @param args the array of command line arguments. + */ + public static void main(String[] args) throws Exception { + TestHtmlTableStyles tester = new TestHtmlTableStyles(); + run(tester, ARGS, TEST, NO_TEST); + tester.printSummary(); + } + + /** + * {@inheritDoc} + */ + public String getBugId() { + return BUG_ID; + } + + /** + * {@inheritDoc} + */ + public String getBugName() { + return getClass().getName(); + } +} diff --git a/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java new file mode 100644 index 00000000000..866c3f42ee9 --- /dev/null +++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg1/TestTable.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package pkg1; + +/** + * Testing table in documentation comment. In the generated documentation, it + * should be displayed as a regular table and not have any styles that the javadoc + * generated tables have. + * + *
+ * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Summary of test table
First Element (Head) Last Element (Tail)
Throws exceptionSpecial valueThrows exceptionSpecial value
InsertaddFirst(e)offerFirst(e)addLast(e)offerLast(e)
RemoveremoveFirst()pollFirst()removeLast()pollLast()
+ */ +public class TestTable +{ + /** + * Field in Class. + */ + public String field; + + /** + * Field constant in Class. + */ + public static final int fieldCnst = 0; + + /** + * Method in Class. + */ + public void methodInClass(int i) {} + + /** + * Deprecated method in Class. + * @deprecated Do not use it. + */ + public void deprMethod() {} + +} diff --git a/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java new file mode 100644 index 00000000000..8414e49bc99 --- /dev/null +++ b/langtools/test/com/sun/javadoc/testHtmlTableStyles/pkg2/TestUse.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package pkg2; + +import pkg1.*; + +/** + * Testing use of TestTable. + */ +public class TestUse +{ + public TestTable tTable; +} diff --git a/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java b/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java index c6b14e05277..5d90617c389 100644 --- a/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java +++ b/langtools/test/com/sun/javadoc/testHtmlTableTags/TestHtmlTableTags.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 6786688 + * @bug 6786688 8008164 * @summary HTML tables should have table summary, caption and table headers. * @author Bhavesh Patel * @library ../lib/ @@ -50,121 +50,121 @@ public class TestHtmlTableTags extends JavadocTester { //Package summary {BUG_ID + FS + "pkg1" + FS + "package-summary.html", - "" }, {BUG_ID + FS + "pkg1" + FS + "package-summary.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "package-summary.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "package-summary.html", - "
" }, // Class documentation {BUG_ID + FS + "pkg1" + FS + "C1.html", - "
" }, {BUG_ID + FS + "pkg1" + FS + "C1.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "C2.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "C2.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "C2.ModalExclusionType.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "C3.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "C4.html", - "
" }, // Class use documentation {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "I1.html", - "
" }, {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", - "
" }, {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "C1.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "C2.ModalExclusionType.html", - "
" }, // Package use documentation {BUG_ID + FS + "pkg1" + FS + "package-use.html", - "
" }, {BUG_ID + FS + "pkg1" + FS + "package-use.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "package-use.html", - "
" }, {BUG_ID + FS + "pkg2" + FS + "package-use.html", - "
" }, // Deprecated {BUG_ID + FS + "deprecated-list.html", - "
" }, {BUG_ID + FS + "deprecated-list.html", - "
" }, // Constant values {BUG_ID + FS + "constant-values.html", - "
" }, diff --git a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java index 4dd70ea2359..1d308246c3f 100644 --- a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java +++ b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8006124 8009684 8016921 8023700 8024096 + * @bug 8006124 8009684 8016921 8023700 8024096 8008164 * @summary Test javadoc support for profiles. * @author Bhavesh Patel, Evgeniya Stepanova * @library ../lib/ @@ -137,7 +137,7 @@ public class TestProfiles extends JavadocTester { }, // need to add teststring when JDK-8015496 will be fixed //Test exception in profiles - {PROFILE_BUG_ID + FS + "compact1-summary.html","
" + NL + "
Exception Summary" @@ -149,7 +149,7 @@ public class TestProfiles extends JavadocTester { }, //Test errors in profiles {PROFILE_BUG_ID + FS + "compact1-summary.html", - "" + NL + "" + NL + "" + NL + "
Error Summary " + "