+ var cla = new HashSet[MMModule]
+ cla.add(self)
+ for m0 in self.mhe.greaters do
+ if not m0.require_doc(dctx) then continue
+ if self.visibility_for(m0) <= 1 then continue # private or hidden
+ if self.mnhe <= m0 then continue # do not want nested stuff
+ if m0.direct_owner != null and not m0.direct_owner.mnhe <= self then continue # not in the right nesting
+ cla.add(m0)
+ end
+ for m0 in self.mhe.smallers do
+ if not m0.require_doc(dctx) then continue
+ if m0.visibility_for(self) <= 1 then continue # private or hidden
+ if m0.direct_owner != null and not m0.direct_owner.mnhe <= self then continue # not in the right nesting
+ cla.add(m0)
+ end
+ for m0 in self.mnhe.smallers do
+ cla.add(m0)
+ end
+ ms = ms.reversed
+ for m0 in ms do
+ if m0 != null then
+ op.append("subgraph \"cluster_{m0.name}\"\{\n")
+ end
+ for c in cla do
+ if c.direct_owner != m0 then continue
+ if c == self then
+ op.append("\"{c.name}\"[shape=box,margin=0.03];\n")
+ else
+ op.append("\"{c.name}\"[URL=\"{c.html_name}.html\"];\n")
+ end
+ end
+ if m0 != null then
+ op.append("\"{m0.name}\"[URL=\"{m0.html_name}.html\"];\n")
+ for c in m0.mhe.direct_greaters do
+ if not cla.has(c) then continue
+ op.append("\"{m0.name}\"->\"{c.name}\";\n")
+ end
+ end
+ end
+ for m0 in ms do
+ # Close the nesting subgraph
+ if m0 != null then
+ op.append("\}\n")
+ end
+ end
+ for c in cla do
+ for c2 in c.tmhe.direct_greaters do
+ if not cla.has(c2) then continue
+ op.append("\"{c.name}\"->\"{c2.name}\";\n")
+ end
+ end
+ op.append("\}\n")
+ dctx.gen_dot(op.to_s, name.to_s)
+ dctx.add("</section>")
+
+ var clas = new Array[MMLocalClass]
+ var props = new HashMap[MMGlobalProperty, Array[MMLocalProperty]]
+ var gprops = new Array[MMLocalProperty]
+ do
+ var m = self
+ for g in m.global_classes do
+ var lc = m[g]
+ if not lc.require_doc(dctx) then continue
+ var im = g.intro.mmmodule
+ if self.visibility_for(im) <= 1 then continue # private import or invisible import
+ var keep = false
+ for lc2 in lc.crhe.greaters_and_self do
+ if not lc2 isa MMSrcLocalClass then continue
+ if not self.mnhe <= lc2.mmmodule then continue # not introduced/redefined here/stolen
+ keep = true
+ end
+ if not keep then continue
+ clas.add(self[g])
+ for gp in lc.global_properties do
+ if self.visibility_for(gp.intro.local_class.mmmodule) <= 1 then continue # private import or invisible import
+ var lp = lc[gp]
+ var mp = lp.local_class.mmmodule
+ if not self.mnhe <= mp then continue # not introduced/redefined here/stolen
+ lp = self[g][gp]
+ if not lp.require_doc(dctx) 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]
+ gprops.add(lp.global.intro)
+ end
+ end
+ end
+ end
+ dctx.add("<section class=\"module\">\n")
+ dctx.open_stage
+ dctx.stage("<article class=\"classes filterable\">\n")
+ dctx.stage("<h2>Classes</h2>\n")
+ dctx.sort(clas)
+ dctx.stage("<ul>\n")
+ for lc in clas do
+ if self.mnhe <= lc.global.intro.mmmodule then
+ dctx.add("<li class='intro'><span title='introduced in this module'>I</span> ")
+ else
+ dctx.add("<li class='redef'><span title='refined in this module'>R</span> ")
+ end
+ dctx.add("{lc.html_link(dctx)}</li>\n")
+ end
+ dctx.stage("</ul></article>\n")
+ dctx.close_stage