var name_sorter = new MEntityNameSorter
redef fun apply do
- for page in doc.pages do
+ for page in doc.pages.values do
if page isa MEntityPage then page.build_inh_list(self, doc)
end
end
redef class MModulePage
redef fun build_inh_list(v, doc) do
- var section = new ImportationListSection
+ var id = mentity.nitdoc_id
+ var section = new TabbedGroup("{id}.importation", "Dependencies")
+ var group = new PanelGroup("list.group", "List")
var imports = self.imports.to_a
v.name_sorter.sort(imports)
- section.children.add new HierarchyListArticle(mentity, "Imports", imports)
+ group.add_child new MEntitiesListArticle("{id}.imports", "Imports", imports)
var clients = self.clients.to_a
v.name_sorter.sort(clients)
- section.children.add new HierarchyListArticle(mentity, "Clients", clients)
- root.children.insert(section, 1)
+ group.add_child new MEntitiesListArticle("{id}.clients", "Clients", clients)
+ section.add_child group
+ 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 id = mentity.nitdoc_id
+ var section = new TabbedGroup("{id}.inheritance", "Inheritance")
+ var group = new PanelGroup("list.group", "List")
var parents = self.parents.to_a
v.name_sorter.sort(parents)
- section.children.add new HierarchyListArticle(mentity, "Parents", parents)
+ group.add_child new MEntitiesListArticle("{id}.parents", "Parents", parents)
var ancestors = self.ancestors.to_a
v.name_sorter.sort(ancestors)
- section.children.add new HierarchyListArticle(mentity, "Ancestors", ancestors)
+ group.add_child new MEntitiesListArticle("{id}.ancestors", "Ancestors", ancestors)
var children = self.children.to_a
v.name_sorter.sort(children)
- section.children.add new HierarchyListArticle(mentity, "Children", children)
+ group.add_child new MEntitiesListArticle("{id}.children", "Children", children)
var descendants = self.descendants.to_a
v.name_sorter.sort(descendants)
- section.children.add new HierarchyListArticle(mentity, "Descendants", descendants)
- root.children.insert(section, 1)
+ group.add_child new MEntitiesListArticle("{id}.descendants", "Descendants", descendants)
+ section.add_child group
+ section.parent = root.children.first
+ root.children.first.children.insert(section, 1)
end
end
-
-# FIXME diff hack
-class ImportationListSection
- super DocSection
-end
-
-# FIXME diff hack
-class InheritanceListSection
- super DocSection
-end
-
-# Dislay a hierarchical list of mentities.
-class HierarchyListArticle
- super MEntityArticle
-
- # Title displayed in the top of this list.
- var list_title: String
-
- # MEntities to display in this list.
- var mentities: Array[MEntity]
-end