logo

class

docCompiler::BuildSearchIndex

sys::Obj
  docCompiler::DocCompilerSupport
    docCompiler::BuildSearchIndex
  1  //
  2  // Copyright (c) 2007, Brian Frank and Andy Frank
  3  // Licensed under the Academic Free License version 3.0
  4  //
  5  // History:
  6  //   5 May 07  Brian Frank  Creation
  7  //
  8  
  9  using compiler
 10  
 11  **
 12  ** BuildSearchIndex generates the top level navigation and search index.
 13  **
 14  class BuildSearchIndex : DocCompilerSupport
 15  {
 16  
 17    new make(DocCompiler compiler)
 18      : super(compiler)
 19    {
 20    }
 21  
 22    Void run()
 23    {
 24      log.debug("  BuildSearchIndex")
 25      file := compiler.outDir + "searchIndex.js".toUri
 26      out  := file.out
 27      out.print("var searchIndex = [\n")
 28      first := true
 29      Pod.list.each |Pod p|
 30      {
 31        if (p.name == "sysTest") return
 32        p.types.each |Type t, Int i|
 33        {
 34          if (!HtmlGenerator.showType(t)) return
 35          if (first) first = false
 36          else out.print(",\n")
 37          out.print("\"$t.qname\"")
 38        }
 39      }
 40      out.print("];\n")
 41      out.close
 42    }
 43  
 44  }

More Info

Slots