src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java
changeset 47850 4a28dc8a86c2
parent 47846 4e78aba768f0
child 49427 d2fd2581325b
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Thu Nov 16 15:13:44 2017 -0800
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Thu Nov 16 15:16:21 2017 -0800
@@ -222,6 +222,7 @@
      *
      * @param mdle the module to be documented
      * @param dlTree the content tree to which the description will be added
+     * @param si the search index item
      */
     protected void addDescription(ModuleElement mdle, Content dlTree, SearchIndexItem si) {
         String moduleName = utils.getFullyQualifiedName(mdle);
@@ -316,7 +317,7 @@
             name = name + utils.flatSignature(ee);
             si.setLabel(name);
             if (!((utils.signature(ee)).equals(utils.flatSignature(ee)))) {
-                si.setUrl(getName(getAnchor(ee)));
+                si.setUrl(links.getName(getAnchor(ee)));
             }
 
         }  else {
@@ -420,7 +421,7 @@
      * @return a content tree for the marker anchor
      */
     public Content getMarkerAnchorForIndex(String anchorNameForIndex) {
-        return getMarkerAnchor(getNameForIndex(anchorNameForIndex), null);
+        return links.createAnchor(getNameForIndex(anchorNameForIndex), null);
     }
 
     /**
@@ -430,7 +431,7 @@
      * @return a valid HTML name string.
      */
     public String getNameForIndex(String unicode) {
-        return "I:" + getName(unicode);
+        return "I:" + links.getName(unicode);
     }
 
     /**
@@ -452,6 +453,13 @@
     }
 
     /**
+     * Creates a search index file.
+     *
+     * @param searchIndexFile   the file to be generated
+     * @param searchIndexZip    the zip file to be generated
+     * @param searchIndexJS     the file for the JavaScript to be generated
+     * @param searchIndex       the search index items
+     * @param varName           the variable name to write in the JavaScript file
      * @throws DocFileIOException if there is a problem creating the search index file
      */
     protected void createSearchIndexFile(DocPath searchIndexFile, DocPath searchIndexZip,