Merge: new `with` statement
[nit.git] / src / doc / doc_phases / doc_hierarchies.nit
index 228607e..23da906 100644 (file)
@@ -40,20 +40,21 @@ end
 
 redef class MModulePage
        redef fun build_inh_list(v, doc) do
-               var section = new ImportationListSection
+               var section = new ImportationListSection(mentity)
                var imports = self.imports.to_a
                v.name_sorter.sort(imports)
                section.add_child new HierarchyListArticle(mentity, "Imports", imports)
                var clients = self.clients.to_a
                v.name_sorter.sort(clients)
                section.add_child new HierarchyListArticle(mentity, "Clients", clients)
-               root.children.insert(section, 1)
+               section.parent = root.children.first
+               root.children.first.children.insert(section, 1)
        end
 end
 
 redef class MClassPage
        redef fun build_inh_list(v, doc) do
-               var section = new InheritanceListSection
+               var section = new InheritanceListSection(mentity)
                var parents = self.parents.to_a
                v.name_sorter.sort(parents)
                section.add_child new HierarchyListArticle(mentity, "Parents", parents)
@@ -66,18 +67,21 @@ redef class MClassPage
                var descendants = self.descendants.to_a
                v.name_sorter.sort(descendants)
                section.add_child new HierarchyListArticle(mentity, "Descendants", descendants)
-               root.children.insert(section, 1)
+               section.parent = root.children.first
+               root.children.first.children.insert(section, 1)
        end
 end
 
 # FIXME diff hack
 class ImportationListSection
        super DocSection
+       super MEntityComposite
 end
 
 # FIXME diff hack
 class InheritanceListSection
        super DocSection
+       super MEntityComposite
 end
 
 # Dislay a hierarchical list of mentities.