+
+ # Fill the quicksearch list JSON object
+ fun file_quicksearch_list_doc(dctx: DocContext)
+ do
+ var entities = new HashMap[String, Array[MMEntity]]
+ var props = new HashMap[MMGlobalProperty, Array[MMLocalProperty]]
+ for m in mhe.greaters_and_self do
+ if not m.require_doc(dctx) then continue
+ var a = new Array[MMEntity]
+ a.add(m)
+ entities[m.html_name] = a
+ end
+ for g in global_classes do
+ var lc = self[g]
+ if not lc.require_doc(dctx) then continue
+ var a = new Array[MMEntity]
+ a.add(lc)
+ entities[lc.html_name] = a
+ for gp in lc.global_properties do
+ var lp = lc[gp]
+ if not lp.require_doc(dctx) then continue
+ if lp.kind == "var" then continue
+ if props.has_key(lp.global) then
+ if not props[lp.global].has(lp) then
+ props[lp.global].add(lp)
+ end
+ else
+ props[lp.global] = [lp]
+ end
+ end
+ end
+
+ for k, v in props do
+ entities[k.short_name] = v
+ end
+
+ var keys = entities.keys.to_a
+ var sorter = new AlphaSorter[String]
+ sorter.sort(keys)
+
+ dctx.open_stage
+ dctx.stage("var entries = \{")
+ for key in keys do
+ dctx.add("\"{key}\": [")
+ for entity in entities[key] do
+ dctx.add(entity.json_entry(dctx))
+ end
+ dctx.add("],")
+ end
+ dctx.stage("\};")
+ dctx.close_stage
+ end