diff --git a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java index 95cd4a44d08c1ba36c8db9b074af063ab176545e..bd84d2caf2d1f96de2eeb8af16d72a0bcb06f5ca 100644 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java @@ -159,10 +159,7 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter { body.addContent(div); if (configuration.showProfiles) { Content profileSummary = configuration.getResource("doclet.Profiles"); - Content profilesTableSummary = configuration.getResource("doclet.Member_Table_Summary", - configuration.getResource("doclet.Profile_Summary"), - configuration.getResource("doclet.profiles")); - addProfilesList(profileSummary, profilesTableSummary, body); + addProfilesList(profileSummary, body); } addPackagesList(packages, text, tableSummary, body); } @@ -214,10 +211,8 @@ public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter { * Do nothing. This will be overridden. * * @param profileSummary the profile summary heading - * @param profilesTableSummary the profiles table summary information * @param body the content tree to which the profiles list will be added */ - protected void addProfilesList(Content profileSummary, Content profilesTableSummary, - Content body) { + protected void addProfilesList(Content profileSummary, Content body) { } } diff --git a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java index e11ed98b527d5ce3b9a62b33a41277f85c8ee936..e2ef6f56c6582c8d4a6514c9884206d3fe300938 100644 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java @@ -123,15 +123,20 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { /** * {@inheritDoc} */ - protected void addProfilesList(Content profileSummary, String profilesTableSummary, - Content body) { - Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, profilesTableSummary, - getTableCaption(profileSummary)); - table.addContent(getSummaryTableHeader(profileTableHeader, "col")); - Content tbody = new HtmlTree(HtmlTag.TBODY); - addProfilesList(tbody); - table.addContent(tbody); - Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table); + protected void addProfilesList(Content profileSummary, Content body) { + Content h2 = HtmlTree.HEADING(HtmlTag.H2, profileSummary); + Content profilesDiv = HtmlTree.DIV(h2); + Content ul = new HtmlTree(HtmlTag.UL); + String profileName; + for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { + profileName = Profile.lookup(i).name; + Content profileLinkContent = getTargetProfileLink("classFrame", + new StringContent(profileName), profileName); + Content li = HtmlTree.LI(profileLinkContent); + ul.addContent(li); + } + profilesDiv.addContent(ul); + Content div = HtmlTree.DIV(HtmlStyle.contentContainer, profilesDiv); body.addContent(div); } @@ -150,31 +155,6 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { body.addContent(div); } - /** - * Adds list of profiles in the index table. Generate link to each profile. - * - * @param tbody the documentation tree to which the list will be added - */ - protected void addProfilesList(Content tbody) { - for (int i = 1; i < configuration.profiles.getProfileCount(); i++) { - String profileName = Profile.lookup(i).name; - Content profileLinkContent = getTargetProfileLink("classFrame", - new StringContent(profileName), profileName); - Content tdProfile = HtmlTree.TD(HtmlStyle.colFirst, profileLinkContent); - HtmlTree tdSummary = new HtmlTree(HtmlTag.TD); - tdSummary.addStyle(HtmlStyle.colLast); - tdSummary.addContent(getSpace()); - HtmlTree tr = HtmlTree.TR(tdProfile); - tr.addContent(tdSummary); - if (i % 2 == 0) { - tr.addStyle(HtmlStyle.altColor); - } else { - tr.addStyle(HtmlStyle.rowColor); - } - tbody.addContent(tr); - } - } - /** * Adds list of packages in the index table. Generate link to each package. * diff --git a/test/com/sun/javadoc/testProfiles/TestProfiles.java b/test/com/sun/javadoc/testProfiles/TestProfiles.java index a52d3ccd5ace13bc395a1b1639af0aa9d4320489..7d878d7ecd3542b5aa404e90a64d3874c559f61c 100644 --- a/test/com/sun/javadoc/testProfiles/TestProfiles.java +++ b/test/com/sun/javadoc/testProfiles/TestProfiles.java @@ -23,7 +23,7 @@ /* * @test - * @bug 8006124 8009684 + * @bug 8006124 8009684 8016921 * @summary Test javadoc support for profiles. * @author Bhavesh Patel * @library ../lib/ @@ -33,7 +33,7 @@ public class TestProfiles extends JavadocTester { //Test information. - private static final String BUG_ID = "8006124-8009684"; + private static final String BUG_ID = "8006124-8009684-8016921"; private static final String PROFILE_BUG_ID = BUG_ID + "-1"; private static final String PACKAGE_BUG_ID = BUG_ID + "-2"; //Javadoc arguments. @@ -105,6 +105,14 @@ public class TestProfiles extends JavadocTester { {PROFILE_BUG_ID + FS + "index.html", "" + }, + //Test for "overview-summary.html" showing the profile list. + {PROFILE_BUG_ID + FS + "overview-summary.html", + "