diff -r 7ee1fd365cdd -r f1b90ea7d402 src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Thu May 16 11:42:04 2013 +0100 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Thu May 23 12:50:40 2013 +0100 @@ -27,6 +27,8 @@ import java.io.*; import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.util.*; @@ -195,8 +197,7 @@ configuration.getText("doclet.Modifier"), configuration.getText("doclet.Type")); overviewLabel = getResource("doclet.Overview"); - defaultPackageLabel = new RawHtml( - DocletConstants.DEFAULT_PACKAGE_NAME); + defaultPackageLabel = new StringContent(DocletConstants.DEFAULT_PACKAGE_NAME); packageLabel = getResource("doclet.Package"); profileLabel = getResource("doclet.Profile"); useLabel = getResource("doclet.navClassUse"); @@ -252,30 +253,30 @@ * @return a content tree for the text */ public Content getResource(String key) { - return new StringContent(configuration.getText(key)); + return configuration.getResource(key); } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file - * @param a1 string argument added to configuration text + * @param o string or content argument added to configuration text * @return a content tree for the text */ - public Content getResource(String key, String a1) { - return new RawHtml(configuration.getText(key, a1)); + public Content getResource(String key, Object o) { + return configuration.getResource(key, o); } /** * Get the configuration string as a content. * * @param key the key to look for in the configuration file - * @param a1 string argument added to configuration text - * @param a2 string argument added to configuration text + * @param o1 string or content argument added to configuration text + * @param o2 string or content argument added to configuration text * @return a content tree for the text */ - public Content getResource(String key, String a1, String a2) { - return new RawHtml(configuration.getText(key, a1, a2)); + public Content getResource(String key, Object o0, Object o1) { + return configuration.getResource(key, o0, o1); } /** @@ -303,10 +304,11 @@ * * @return a content for the SCRIPT tag */ - protected Content getFramesetJavaScript(){ + protected Content getFramesetJavaScript() { HtmlTree script = new HtmlTree(HtmlTag.SCRIPT); script.addAttr(HtmlAttr.TYPE, "text/javascript"); - String scriptCode = DocletConstants.NL + " targetPage = \"\" + window.location.search;" + DocletConstants.NL + + String scriptCode = DocletConstants.NL + + " targetPage = \"\" + window.location.search;" + DocletConstants.NL + " if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL + " targetPage = targetPage.substring(1);" + DocletConstants.NL + " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL + @@ -433,16 +435,6 @@ return title; } - /** - * Return, text passed, with Italics <i> and </i> tags, surrounding it. - * So if the text passed is "Hi", then string returned will be "<i>Hi</i>". - * - * @param text String to be printed in between <I> and </I> tags. - */ - public String italicsText(String text) { - return "" + text + ""; - } - public String codeText(String text) { return "" + text + ""; }