< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java

Print this page




 161             }
 162         }
 163         if (j >= searchListSize) {
 164             while (i < memberListSize) {
 165                 addDescription(dl, memberlist.get(i));
 166                 i++;
 167             }
 168         }
 169         contentTree.add(dl);
 170     }
 171 
 172     protected void addHeading(Character uc, Content contentTree) {
 173         String unicode = uc.toString();
 174         contentTree.add(getMarkerAnchorForIndex(unicode));
 175         Content headContent = new StringContent(unicode);
 176         Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, false,
 177                 HtmlStyle.title, headContent);
 178         contentTree.add(heading);
 179     }
 180 
 181     @SuppressWarnings("removal")
 182     protected void addDescription(Content dl, Element element) {
 183         SearchIndexItem si = new SearchIndexItem();
 184         new SimpleElementVisitor14<Void, Void>() {
 185 
 186             @Override
 187             public Void visitModule(ModuleElement e, Void p) {
 188                 if (configuration.showModules) {
 189                     addDescription(e, dl, si);
 190                     configuration.moduleSearchIndex.add(si);
 191                 }
 192                 return null;
 193             }
 194 
 195             @Override
 196             public Void visitPackage(PackageElement e, Void p) {
 197                 addDescription(e, dl, si);
 198                 configuration.packageSearchIndex.add(si);
 199                 return null;
 200             }
 201 




 161             }
 162         }
 163         if (j >= searchListSize) {
 164             while (i < memberListSize) {
 165                 addDescription(dl, memberlist.get(i));
 166                 i++;
 167             }
 168         }
 169         contentTree.add(dl);
 170     }
 171 
 172     protected void addHeading(Character uc, Content contentTree) {
 173         String unicode = uc.toString();
 174         contentTree.add(getMarkerAnchorForIndex(unicode));
 175         Content headContent = new StringContent(unicode);
 176         Content heading = HtmlTree.HEADING(Headings.CONTENT_HEADING, false,
 177                 HtmlStyle.title, headContent);
 178         contentTree.add(heading);
 179     }
 180 
 181     @SuppressWarnings("preview")
 182     protected void addDescription(Content dl, Element element) {
 183         SearchIndexItem si = new SearchIndexItem();
 184         new SimpleElementVisitor14<Void, Void>() {
 185 
 186             @Override
 187             public Void visitModule(ModuleElement e, Void p) {
 188                 if (configuration.showModules) {
 189                     addDescription(e, dl, si);
 190                     configuration.moduleSearchIndex.add(si);
 191                 }
 192                 return null;
 193             }
 194 
 195             @Override
 196             public Void visitPackage(PackageElement e, Void p) {
 197                 addDescription(e, dl, si);
 198                 configuration.packageSearchIndex.add(si);
 199                 return null;
 200             }
 201 


< prev index next >