X-Git-Url: http://nitlanguage.org diff --git a/src/doc/doc_phases/doc_intros_redefs.nit b/src/doc/doc_phases/doc_intros_redefs.nit index 54f7c18..ae341f9 100644 --- a/src/doc/doc_phases/doc_intros_redefs.nit +++ b/src/doc/doc_phases/doc_intros_redefs.nit @@ -24,7 +24,7 @@ class IntroRedefListPhase super DocPhase redef fun apply do - for page in doc.pages do + for page in doc.pages.values do if not page isa MEntityPage then continue page.root.build_intro_redef_list(self, doc, page) end @@ -54,52 +54,33 @@ redef class DefinitionArticle # TODO this should move to MEntity? private fun build_mmodule_list(v: IntroRedefListPhase, doc: DocModel, mmodule: MModule) do - var section = new IntrosRedefsSection(mentity) - var group = new PanelGroup("List") + var section = new TabbedGroup("{mentity.nitdoc_id}.intros_redefs") + section.toc_title = "Intros / Redefs" + var group = new PanelGroup("list.group", "List") var intros = mmodule.intro_mclassdefs(v.ctx.min_visibility).to_a doc.mainmodule.linearize_mclassdefs(intros) - group.add_child new IntrosRedefsListArticle(mentity, "Introduces", intros) + group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.intros", "Introduces", intros) var redefs = mmodule.redef_mclassdefs(v.ctx.min_visibility).to_a doc.mainmodule.linearize_mclassdefs(redefs) - group.add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs) + group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.redefs", "Redefines", redefs) section.add_child group add_child(section) end # TODO this should move to MEntity? private fun build_mclassdef_list(v: IntroRedefListPhase, doc: DocModel, mclassdef: MClassDef) do - var section = new IntrosRedefsSection(mentity) - var group = new PanelGroup("List") + var section = new TabbedGroup("{mentity.nitdoc_id}.intros_redefs") + section.toc_title = "Intros / Redefs" + var group = new PanelGroup("list.group", "List") var intros = mclassdef.collect_intro_mpropdefs(v.ctx.min_visibility).to_a # FIXME avoid diff changes # v.ctx.mainmodule.linearize_mpropdefs(intros) - group.add_child new IntrosRedefsListArticle(mentity, "Introduces", intros) + group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.intros", "Introduces", intros) var redefs = mclassdef.collect_redef_mpropdefs(v.ctx.min_visibility).to_a # FIXME avoid diff changes # v.ctx.mainmodule.linearize_mpropdefs(redefs) - group.add_child new IntrosRedefsListArticle(mentity, "Redefines", redefs) + group.add_child new MEntitiesListArticle("{mentity.nitdoc_id}.redefs", "Redefines", redefs) section.add_child group add_child(section) end - -end - -# Section that contains the intros and redefs lists. -class IntrosRedefsSection - super TabbedGroup - super MEntitySection -end - -# An article that displays a list of introduced / refined mentities. -# -# FIXME diff hack -# This can merged with InheritanceListArticle in a more generic class. -class IntrosRedefsListArticle - super MEntityArticle - - # Title displayed as header of the list. - var list_title: String - - # Intro mentities to list. - var mentities: Array[MEntity] end