changeset 1738:e6c5b5ee9fac

8011662: Remove single instance of resource with HTML from doclet resource bundle Reviewed-by: bpatel, darcy
author jjg
date Tue, 14 May 2013 10:14:53 -0700
parents 6ea964c78845
children ce4f0769b4b2
files src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties
diffstat 4 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue May 14 10:14:52 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue May 14 10:14:53 2013 -0700
@@ -450,7 +450,10 @@
         Content bodyTree = getBody(true, getWindowTitle(title));
         addTop(bodyTree);
         addNavLinks(true, bodyTree);
-        Content headContent = getResource("doclet.ClassUse_Title", cltype, clname);
+        ContentBuilder headContent = new ContentBuilder();
+        headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
+        headContent.addContent(new HtmlTree(HtmlTag.BR));
+        headContent.addContent(clname);
         Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
                 true, HtmlStyle.title, headContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue May 14 10:14:52 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue May 14 10:14:53 2013 -0700
@@ -272,7 +272,10 @@
         Content bodyTree = getBody(true, getWindowTitle(title));
         addTop(bodyTree);
         addNavLinks(true, bodyTree);
-        Content headContent = getResource("doclet.ClassUse_Title", packageText, name);
+        ContentBuilder headContent = new ContentBuilder();
+        headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
+        headContent.addContent(new HtmlTree(HtmlTag.BR));
+        headContent.addContent(name);
         Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
                 HtmlStyle.title, headContent);
         Content div = HtmlTree.DIV(HtmlStyle.header, heading);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Tue May 14 10:14:52 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Tue May 14 10:14:53 2013 -0700
@@ -40,7 +40,7 @@
 
     @Override
     public void addContent(Content content) {
-        if (content.isEmpty())
+        if ((content instanceof ContentBuilder) && content.isEmpty())
             return;
         ensureMutableContents();
         if (content instanceof ContentBuilder) {
--- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Tue May 14 10:14:52 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Tue May 14 10:14:53 2013 -0700
@@ -179,7 +179,7 @@
 doclet.ClassUse_ConstructorThrows=Constructors in {1} that throw {0}
 doclet.ClassUse_No.usage.of.0=No usage of {0}
 doclet.Window_ClassUse_Header=Uses of {0} {1}
-doclet.ClassUse_Title=Uses of {0}<br>{1}
+doclet.ClassUse_Title=Uses of {0}
 doclet.navClassUse=Use
 doclet.Error_in_packagelist=Error in using -group option: {0} {1}
 doclet.Groupname_already_used=In -group option, groupname already used: {0}