8009684: Default top left frame should be "All Packages" in the generated javadoc documentation
Reviewed-by: jjg
This commit is contained in:
parent
09e3f06ae6
commit
82210b98a8
@ -135,13 +135,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
|||||||
protected Content getFrameDetails() {
|
protected Content getFrameDetails() {
|
||||||
HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame",
|
HtmlTree frameset = HtmlTree.FRAMESET("20%,80%", null, "Documentation frame",
|
||||||
"top.loadFrames()");
|
"top.loadFrames()");
|
||||||
if (configuration.showProfiles) {
|
if (noOfPackages <= 1) {
|
||||||
HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
|
|
||||||
"top.loadFrames()");
|
|
||||||
addAllProfilesFrameTag(leftFrameset);
|
|
||||||
addAllClassesFrameTag(leftFrameset);
|
|
||||||
frameset.addContent(leftFrameset);
|
|
||||||
} else if (noOfPackages <= 1) {
|
|
||||||
addAllClassesFrameTag(frameset);
|
addAllClassesFrameTag(frameset);
|
||||||
} else if (noOfPackages > 1) {
|
} else if (noOfPackages > 1) {
|
||||||
HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
|
HtmlTree leftFrameset = HtmlTree.FRAMESET(null, "30%,70%", "Left frames",
|
||||||
@ -155,17 +149,6 @@ public class FrameOutputWriter extends HtmlDocletWriter {
|
|||||||
return frameset;
|
return frameset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
* Add the FRAME tag for the frame that lists all packages.
|
||||||
*
|
*
|
||||||
|
@ -162,7 +162,7 @@ public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
|
|||||||
*/
|
*/
|
||||||
protected void addAllProfilesLink(Content div) {
|
protected void addAllProfilesLink(Content div) {
|
||||||
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
|
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
|
||||||
allprofilesLabel, "", "profileListFrame");
|
allprofilesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content span = HtmlTree.SPAN(linkContent);
|
||||||
div.addContent(span);
|
div.addContent(span);
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
String profileName = (Profile.lookup(profile)).name;
|
String profileName = (Profile.lookup(profile)).name;
|
||||||
profileLabel = new StringContent(profileName);
|
profileLabel = new StringContent(profileName);
|
||||||
profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "",
|
profileLinkContent = getHyperLink(DocPaths.profileFrame(profileName), profileLabel, "",
|
||||||
"profileListFrame");
|
"packageListFrame");
|
||||||
Content li = HtmlTree.LI(profileLinkContent);
|
Content li = HtmlTree.LI(profileLinkContent);
|
||||||
return li;
|
return li;
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ public class ProfileIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
*/
|
*/
|
||||||
protected void addAllPackagesLink(Content div) {
|
protected void addAllPackagesLink(Content div) {
|
||||||
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
|
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
|
||||||
allpackagesLabel, "", "profileListFrame");
|
allpackagesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content span = HtmlTree.SPAN(linkContent);
|
||||||
div.addContent(span);
|
div.addContent(span);
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
*/
|
*/
|
||||||
protected void addAllPackagesLink(Content div) {
|
protected void addAllPackagesLink(Content div) {
|
||||||
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
|
Content linkContent = getHyperLink(DocPaths.OVERVIEW_FRAME,
|
||||||
allpackagesLabel, "", "profileListFrame");
|
allpackagesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content span = HtmlTree.SPAN(linkContent);
|
||||||
div.addContent(span);
|
div.addContent(span);
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ public class ProfilePackageIndexFrameWriter extends AbstractProfileIndexWriter {
|
|||||||
*/
|
*/
|
||||||
protected void addAllProfilesLink(Content div) {
|
protected void addAllProfilesLink(Content div) {
|
||||||
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
|
Content linkContent = getHyperLink(DocPaths.PROFILE_OVERVIEW_FRAME,
|
||||||
allprofilesLabel, "", "profileListFrame");
|
allprofilesLabel, "", "packageListFrame");
|
||||||
Content span = HtmlTree.SPAN(linkContent);
|
Content span = HtmlTree.SPAN(linkContent);
|
||||||
div.addContent(span);
|
div.addContent(span);
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8006124
|
* @bug 8006124 8009684
|
||||||
* @summary Test javadoc support for profiles.
|
* @summary Test javadoc support for profiles.
|
||||||
* @author Bhavesh Patel
|
* @author Bhavesh Patel
|
||||||
* @library ../lib/
|
* @library ../lib/
|
||||||
@ -33,7 +33,7 @@
|
|||||||
public class TestProfiles extends JavadocTester {
|
public class TestProfiles extends JavadocTester {
|
||||||
|
|
||||||
//Test information.
|
//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 PROFILE_BUG_ID = BUG_ID + "-1";
|
||||||
private static final String PACKAGE_BUG_ID = BUG_ID + "-2";
|
private static final String PACKAGE_BUG_ID = BUG_ID + "-2";
|
||||||
//Javadoc arguments.
|
//Javadoc arguments.
|
||||||
@ -49,17 +49,17 @@ public class TestProfiles extends JavadocTester {
|
|||||||
// Tests for profile-overview-frame.html listing all profiles.
|
// Tests for profile-overview-frame.html listing all profiles.
|
||||||
{PROFILE_BUG_ID + FS + "profile-overview-frame.html",
|
{PROFILE_BUG_ID + FS + "profile-overview-frame.html",
|
||||||
"<span><a href=\"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",
|
{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>"
|
+ "compact1</a></li>"
|
||||||
},
|
},
|
||||||
// Tests for profileName-frame.html listing all packages in a profile.
|
// Tests for profileName-frame.html listing all packages in a profile.
|
||||||
{PROFILE_BUG_ID + FS + "compact2-frame.html",
|
{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\" "
|
+ "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",
|
{PROFILE_BUG_ID + FS + "compact2-frame.html",
|
||||||
"<li><a href=\"pkg4/compact2-package-frame.html\" "
|
"<li><a href=\"pkg4/compact2-package-frame.html\" "
|
||||||
@ -96,11 +96,15 @@ public class TestProfiles extends JavadocTester {
|
|||||||
//Test for "overview-frame.html" showing the "All Profiles" link.
|
//Test for "overview-frame.html" showing the "All Profiles" link.
|
||||||
{PROFILE_BUG_ID + FS + "overview-frame.html",
|
{PROFILE_BUG_ID + FS + "overview-frame.html",
|
||||||
"<span><a href=\"profile-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.
|
//Test for "className.html" showing the profile information for the type.
|
||||||
{PROFILE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html",
|
{PROFILE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html",
|
||||||
"<div class=\"subTitle\">compact1, compact2, compact3</div>"
|
"<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 = {
|
private static final String[][] PROFILES_NEGATED_TEST = {
|
||||||
@ -131,12 +135,12 @@ public class TestProfiles extends JavadocTester {
|
|||||||
private static final String[][] PACKAGES_NEGATED_TEST = {
|
private static final String[][] PACKAGES_NEGATED_TEST = {
|
||||||
{PACKAGE_BUG_ID + FS + "profile-overview-frame.html",
|
{PACKAGE_BUG_ID + FS + "profile-overview-frame.html",
|
||||||
"<span><a href=\"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",
|
{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\" "
|
+ "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",
|
{PACKAGE_BUG_ID + FS + "pkg2" + FS + "compact2-package-frame.html",
|
||||||
"<a href=\"../compact2-summary.html\" target=\"classFrame\">"
|
"<a href=\"../compact2-summary.html\" target=\"classFrame\">"
|
||||||
@ -151,7 +155,7 @@ public class TestProfiles extends JavadocTester {
|
|||||||
},
|
},
|
||||||
{PACKAGE_BUG_ID + FS + "overview-frame.html",
|
{PACKAGE_BUG_ID + FS + "overview-frame.html",
|
||||||
"<span><a href=\"profile-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",
|
{PACKAGE_BUG_ID + FS + "pkg2" + FS + "Class1Pkg2.html",
|
||||||
"<div class=\"subTitle\">compact1, compact2, compact3</div>"
|
"<div class=\"subTitle\">compact1, compact2, compact3</div>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user