rem:  tree = document.getElementById("help-index-tree"); sourceDS = tree.database; if (!sourceDS) sourceDS = loadCompositeDS(tree.datasources); doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0); 
add:  if (searchDatasources != "rdf:null") { if (!searchDS) searchDS = loadCompositeDS(searchDatasources); doFindOnDatasource(resultsDS, searchDS, RDF_ROOT, 0); } 
context: function doFind() {  var searchTree = document.getElementById("help-search-tree");  var findText = document.getElementById("findText");  // clear any previous results.  clearDatabases(searchTree.database);  // split search string into separate terms and compile into regexp's  RE = findText.value.split(/\s+/);  for (var i=0; i < RE.length; i++) {    if (RE[i] == "")      continue;    RE[i] = new RegExp(RE[i], "i");  }  var resultsDS =  Components.classes["@mozilla.org/rdf/datasource;1?name=in-memory-datasource"].createInstance(Components.interfaces.nsIRDFDataSource);  var tree = document.getElementById("help-toc-tree");  var sourceDS = tree.database;  doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0);  // search index.  tree = document.getElementById("help-index-tree");  sourceDS = tree.database;  if (!sourceDS) // If the index has never been displayed this will be null (sigh!).    sourceDS = loadCompositeDS(tree.datasources);  doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0);  // search glossary.  tree = document.getElementById("help-glossary-tree");  sourceDS = tree.database;  if (!sourceDS) // If the glossary has never been displayed this will be null (sigh!).    sourceDS = loadCompositeDS(tree.datasources);  doFindOnDatasource(resultsDS, sourceDS, RDF_ROOT, 0);  // Add the datasource to the search tree  searchTree.database.AddDataSource(resultsDS);  searchTree.builder.rebuild();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/019ec3fba2742f117e373fe522a3cfcbcfb1c2bb/help.js/buggy/extensions/help/resources/content/help.js