1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Thu Oct 10 08:51:55 2013 +0200 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Thu Oct 10 10:51:15 2013 -0700 1.3 @@ -89,10 +89,11 @@ 1.4 * @param memberlist List of members for the unicode character 1.5 * @param contentTree the content tree to which the information will be added 1.6 */ 1.7 - protected void addContents(Character unicode, List<? extends Doc> memberlist, 1.8 + protected void addContents(Character uc, List<? extends Doc> memberlist, 1.9 Content contentTree) { 1.10 - contentTree.addContent(getMarkerAnchor("_" + unicode + "_")); 1.11 - Content headContent = new StringContent(unicode.toString()); 1.12 + String unicode = uc.toString(); 1.13 + contentTree.addContent(getMarkerAnchorForIndex(unicode)); 1.14 + Content headContent = new StringContent(unicode); 1.15 Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false, 1.16 HtmlStyle.title, headContent); 1.17 contentTree.addContent(heading); 1.18 @@ -253,4 +254,24 @@ 1.19 addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing, 1.20 false, contentTree); 1.21 } 1.22 + 1.23 + /** 1.24 + * Get the marker anchor which will be added to the index documentation tree. 1.25 + * 1.26 + * @param anchorNameForIndex the anchor name attribute for index page 1.27 + * @return a content tree for the marker anchor 1.28 + */ 1.29 + public Content getMarkerAnchorForIndex(String anchorNameForIndex) { 1.30 + return getMarkerAnchor(getNameForIndex(anchorNameForIndex), null); 1.31 + } 1.32 + 1.33 + /** 1.34 + * Generate a valid HTML name for member index page. 1.35 + * 1.36 + * @param unicode the string that needs to be converted to valid HTML name. 1.37 + * @return a valid HTML name string. 1.38 + */ 1.39 + public String getNameForIndex(String unicode) { 1.40 + return "I:" + getName(unicode); 1.41 + } 1.42 }