8011662: Remove single instance of resource with HTML from doclet resource bundle

Tue, 14 May 2013 10:14:53 -0700

author
jjg
date
Tue, 14 May 2013 10:14:53 -0700
changeset 1739
e6c5b5ee9fac
parent 1738
6ea964c78845
child 1740
ce4f0769b4b2

8011662: Remove single instance of resource with HTML from doclet resource bundle
Reviewed-by: bpatel, darcy

src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue May 14 10:14:52 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue May 14 10:14:53 2013 -0700
     1.3 @@ -450,7 +450,10 @@
     1.4          Content bodyTree = getBody(true, getWindowTitle(title));
     1.5          addTop(bodyTree);
     1.6          addNavLinks(true, bodyTree);
     1.7 -        Content headContent = getResource("doclet.ClassUse_Title", cltype, clname);
     1.8 +        ContentBuilder headContent = new ContentBuilder();
     1.9 +        headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
    1.10 +        headContent.addContent(new HtmlTree(HtmlTag.BR));
    1.11 +        headContent.addContent(clname);
    1.12          Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
    1.13                  true, HtmlStyle.title, headContent);
    1.14          Content div = HtmlTree.DIV(HtmlStyle.header, heading);
     2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue May 14 10:14:52 2013 -0700
     2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue May 14 10:14:53 2013 -0700
     2.3 @@ -272,7 +272,10 @@
     2.4          Content bodyTree = getBody(true, getWindowTitle(title));
     2.5          addTop(bodyTree);
     2.6          addNavLinks(true, bodyTree);
     2.7 -        Content headContent = getResource("doclet.ClassUse_Title", packageText, name);
     2.8 +        ContentBuilder headContent = new ContentBuilder();
     2.9 +        headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
    2.10 +        headContent.addContent(new HtmlTree(HtmlTag.BR));
    2.11 +        headContent.addContent(name);
    2.12          Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
    2.13                  HtmlStyle.title, headContent);
    2.14          Content div = HtmlTree.DIV(HtmlStyle.header, heading);
     3.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Tue May 14 10:14:52 2013 -0700
     3.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/ContentBuilder.java	Tue May 14 10:14:53 2013 -0700
     3.3 @@ -40,7 +40,7 @@
     3.4  
     3.5      @Override
     3.6      public void addContent(Content content) {
     3.7 -        if (content.isEmpty())
     3.8 +        if ((content instanceof ContentBuilder) && content.isEmpty())
     3.9              return;
    3.10          ensureMutableContents();
    3.11          if (content instanceof ContentBuilder) {
     4.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Tue May 14 10:14:52 2013 -0700
     4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Tue May 14 10:14:53 2013 -0700
     4.3 @@ -179,7 +179,7 @@
     4.4  doclet.ClassUse_ConstructorThrows=Constructors in {1} that throw {0}
     4.5  doclet.ClassUse_No.usage.of.0=No usage of {0}
     4.6  doclet.Window_ClassUse_Header=Uses of {0} {1}
     4.7 -doclet.ClassUse_Title=Uses of {0}<br>{1}
     4.8 +doclet.ClassUse_Title=Uses of {0}
     4.9  doclet.navClassUse=Use
    4.10  doclet.Error_in_packagelist=Error in using -group option: {0} {1}
    4.11  doclet.Groupname_already_used=In -group option, groupname already used: {0}

mercurial