1 19 20 package org.netbeans.modules.javadoc.search; 21 22 import org.openide.filesystems.FileObject; 23 import org.openide.util.HelpCtx; 24 import org.openide.util.NbBundle; 25 26 29 public class Jdk12SearchType extends JavadocSearchType { 30 31 private boolean caseSensitive = true; 32 33 34 static final long serialVersionUID =-2453877778724454324L; 35 36 39 public String displayName() { 40 return NbBundle.getBundle( Jdk12SearchType.class ).getString("CTL_Jdk12_search_eng"); } 42 43 46 public HelpCtx getHelpCtx () { 47 return new HelpCtx (Jdk12SearchType.class); 48 } 49 50 53 public boolean isCaseSensitive() { 54 return caseSensitive; 55 } 56 57 60 public void setCaseSensitive(boolean caseSensitive) { 61 boolean oldVal = this.caseSensitive; 62 this.caseSensitive = caseSensitive; 63 this.firePropertyChange("caseSensitive", oldVal ? Boolean.TRUE : Boolean.FALSE, caseSensitive ? Boolean.TRUE : Boolean.FALSE); } 65 66 public FileObject getDocFileObject( FileObject apidocRoot ) { 67 68 FileObject fo = apidocRoot.getFileObject( "index-files" ); if ( fo != null ) { 70 return fo; 71 } 72 73 fo = apidocRoot.getFileObject( "index-all.html" ); if ( fo != null ) { 75 return fo; 76 } 77 78 return null; 79 } 80 81 88 public IndexSearchThread getSearchThread( String toFind, FileObject fo, IndexSearchThread.DocIndexItemConsumer diiConsumer ){ 89 return new SearchThreadJdk12 ( toFind, fo, diiConsumer, isCaseSensitive() ); 90 } 91 92 93 public boolean accepts(FileObject apidocRoot, String encoding) { 94 return true; 96 } 97 } 98 | Popular Tags |