8009684: Default top left frame should be "All Packages" in the generated javadoc documentation
Reviewed-by: jjg
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Wed Mar 13 22:03:09 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java Wed Mar 13 14:47:15 2013 -0700
@@ -135,13 +135,7 @@
protected Content getFrameDetails() {
HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame",
"top.loadFrames()");
- if (configuration.showProfiles) {
- HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
- "top.loadFrames()");
- addAllProfilesFrameTag(leftFrameset);
- addAllClassesFrameTag(leftFrameset);
- frameset.addContent(leftFrameset);
- } else if (noOfPackages <= 1) {
+ if (noOfPackages <= 1) {
addAllClassesFrameTag(frameset);
} else if (noOfPackages > 1) {
HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
@@ -156,17 +150,6 @@
}
/**
- * Add the FRAME tag for the frame that lists all profiles.
- *
- * @param contentTree the content tree to which the information will be added
- */
- private void addAllProfilesFrameTag(Content contentTree) {
- HtmlTree frame = HtmlTree.FRAME(DocPaths.PROFILE_OVERVIEW_FRAME.getPath(),
- "profileListFrame", configuration.getText("doclet.All_Profiles"));
- contentTree.addContent(frame);
- }
-
- /**
* Add the FRAME tag for the frame that lists all packages.
*
* @param contentTree the content tree to which the information will be added
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Wed Mar 13 22:03:09 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java Wed Mar 13 14:47:15 2013 -0700
@@ -162,7 +162,7 @@
*/
protected void addAllProfilesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
- allprofilesLabel, "", "profileListFrame");
+ allprofilesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Wed Mar 13 22:03:09 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java Wed Mar 13 14:47:15 2013 -0700
@@ -107,7 +107,7 @@
String profileName = (Profile.lookup(profile)).name;
profileLabel = new StringContent(profileName);
profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "",
- "profileListFrame");
+ "packageListFrame");
Content li = HtmlTree.LI(profileLinkContent);
return li;
}
@@ -154,7 +154,7 @@
*/
protected void addAllPackagesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
- allpackagesLabel, "", "profileListFrame");
+ allpackagesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Wed Mar 13 22:03:09 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java Wed Mar 13 14:47:15 2013 -0700
@@ -172,7 +172,7 @@
*/
protected void addAllPackagesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
- allpackagesLabel, "", "profileListFrame");
+ allpackagesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
@@ -185,7 +185,7 @@
*/
protected void addAllProfilesLink(Content div) {
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
- allprofilesLabel, "", "profileListFrame");
+ allprofilesLabel, "", "packageListFrame");
Content span = HtmlTree.SPAN(linkContent);
div.addContent(span);
}
--- a/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java Wed Mar 13 22:03:09 2013 +0100
+++ b/langtools/test/com/sun/javadoc/testProfiles/TestProfiles.java Wed Mar 13 14:47:15 2013 -0700
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8006124
+ * @bug 8006124 8009684
* @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";
+ private static final String BUG_ID = "8006124-8009684";
private static final String PROFILE_BUG_ID = BUG_ID + "-1";
private static final String PACKAGE_BUG_ID = BUG_ID + "-2";
//Javadoc arguments.
@@ -49,17 +49,17 @@
// Tests for profile-overview-frame.html listing all profiles.
{PROFILE_BUG_ID + FS + "profile-overview-frame.html",
"<span><a href=\"overview-frame.html\" "
- + "target=\"profileListFrame\">All Packages</a></span>"
+ + "target=\"packageListFrame\">All Packages</a></span>"
},
{PROFILE_BUG_ID + FS + "profile-overview-frame.html",
- "<li><a href=\"compact1-frame.html\" target=\"profileListFrame\">"
+ "<li><a href=\"compact1-frame.html\" target=\"packageListFrame\">"
+ "compact1</a></li>"
},
// Tests for profileName-frame.html listing all packages in a profile.
{PROFILE_BUG_ID + FS + "compact2-frame.html",
- "<span><a href=\"overview-frame.html\" target=\"profileListFrame\">"
+ "<span><a href=\"overview-frame.html\" target=\"packageListFrame\">"
+ "All Packages</a></span><span><a href=\"profile-overview-frame.html\" "
- + "target=\"profileListFrame\">All Profiles</a></span>"
+ + "target=\"packageListFrame\">All Profiles</a></span>"
},
{PROFILE_BUG_ID + FS + "compact2-frame.html",
"<li><a href=\"pkg4/compact2-package-frame.html\" "
@@ -96,11 +96,15 @@
//Test for "overview-frame.html" showing the "All Profiles" link.
{PROFILE_BUG_ID + FS + "overview-frame.html",
"<span><a href=\"profile-overview-frame.html\" "
- + "target=\"profileListFrame\">All Profiles</a></span>"
+ + "target=\"packageListFrame\">All Profiles</a></span>"
},
//Test for "className.html" showing the profile information for the type.
{PROFILE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html",
"<div class=\"subTitle\">compact1, compact2, compact3</div>"
+ },
+ {PROFILE_BUG_ID + FS + "index.html",
+ "<frame src=\"overview-frame.html\" name=\"packageListFrame\" " +
+ "title=\"All Packages\">"
}
};
private static final String[][] PROFILES_NEGATED_TEST = {
@@ -131,12 +135,12 @@
private static final String[][] PACKAGES_NEGATED_TEST = {
{PACKAGE_BUG_ID + FS + "profile-overview-frame.html",
"<span><a href=\"overview-frame.html\" "
- + "target=\"profileListFrame\">All Packages</a></span>"
+ + "target=\"packageListFrame\">All Packages</a></span>"
},
{PACKAGE_BUG_ID + FS + "compact2-frame.html",
- "<span><a href=\"overview-frame.html\" target=\"profileListFrame\">"
+ "<span><a href=\"overview-frame.html\" target=\"packageListFrame\">"
+ "All Packages</a></span><span><a href=\"profile-overview-frame.html\" "
- + "target=\"profileListFrame\">All Profiles</a></span>"
+ + "target=\"packageListFrame\">All Profiles</a></span>"
},
{PACKAGE_BUG_ID + FS + "pkg2" + FS + "compact2-package-frame.html",
"<a href=\"../compact2-summary.html\" target=\"classFrame\">"
@@ -151,7 +155,7 @@
},
{PACKAGE_BUG_ID + FS + "overview-frame.html",
"<span><a href=\"profile-overview-frame.html\" "
- + "target=\"profileListFrame\">All Profiles</a></span>"
+ + "target=\"packageListFrame\">All Profiles</a></span>"
},
{PACKAGE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html",
"<div class=\"subTitle\">compact1, compact2, compact3</div>"