< prev index next >
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java
Print this page
rev 47482 : 8190295: Introduce a new Table builder class
rev 47486 : 8190821: Introduce a new Links builder class
*** 220,229 ****
--- 220,230 ----
/**
* Add one line summary comment for the module.
*
* @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);
Content link = getModuleLink(mdle, new StringContent(moduleName));
si.setLabel(moduleName);
*** 314,324 ****
if (utils.isExecutableElement(member)) {
ExecutableElement ee = (ExecutableElement)member;
name = name + utils.flatSignature(ee);
si.setLabel(name);
if (!((utils.signature(ee)).equals(utils.flatSignature(ee)))) {
! si.setUrl(getName(getAnchor(ee)));
}
} else {
si.setLabel(name);
}
--- 315,325 ----
if (utils.isExecutableElement(member)) {
ExecutableElement ee = (ExecutableElement)member;
name = name + utils.flatSignature(ee);
si.setLabel(name);
if (!((utils.signature(ee)).equals(utils.flatSignature(ee)))) {
! si.setUrl(links.getName(getAnchor(ee)));
}
} else {
si.setLabel(name);
}
*** 418,438 ****
*
* @param anchorNameForIndex the anchor name attribute for index page
* @return a content tree for the marker anchor
*/
public Content getMarkerAnchorForIndex(String anchorNameForIndex) {
! return getMarkerAnchor(getNameForIndex(anchorNameForIndex), null);
}
/**
* Generate a valid HTML name for member index page.
*
* @param unicode the string that needs to be converted to valid HTML name.
* @return a valid HTML name string.
*/
public String getNameForIndex(String unicode) {
! return "I:" + getName(unicode);
}
/**
* @throws DocFileIOException if there is a problem creating any of the search index files
*/
--- 419,439 ----
*
* @param anchorNameForIndex the anchor name attribute for index page
* @return a content tree for the marker anchor
*/
public Content getMarkerAnchorForIndex(String anchorNameForIndex) {
! return links.createAnchor(getNameForIndex(anchorNameForIndex), null);
}
/**
* Generate a valid HTML name for member index page.
*
* @param unicode the string that needs to be converted to valid HTML name.
* @return a valid HTML name string.
*/
public String getNameForIndex(String unicode) {
! return "I:" + links.getName(unicode);
}
/**
* @throws DocFileIOException if there is a problem creating any of the search index files
*/
*** 450,459 ****
--- 451,467 ----
createSearchIndexFile(DocPaths.TAG_SEARCH_INDEX_JSON, DocPaths.TAG_SEARCH_INDEX_ZIP,
DocPaths.TAG_SEARCH_INDEX_JS, configuration.tagSearchIndex, "tagSearchIndex");
}
/**
+ * 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,
DocPath searchIndexJS, Collection<SearchIndexItem> searchIndex, String varName) throws DocFileIOException {
if (!searchIndex.isEmpty()) {
< prev index next >