Merge: Fallback doc
authorJean Privat <jean@pryen.org>
Thu, 4 Dec 2014 03:29:15 +0000 (22:29 -0500)
committerJean Privat <jean@pryen.org>
Thu, 4 Dec 2014 03:29:15 +0000 (22:29 -0500)
In order to fill the descriptions on the [overview page], add a way for a mproject or a mgroup to use the mdoc of other entities.

  [overview page]: http://nitlanguage.org/doc/stdlib/

Pull-Request: #954
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

1  2 
src/doc/doc_model.nit

diff --combined src/doc/doc_model.nit
@@@ -172,6 -172,7 +172,7 @@@ redef class MProjec
  
        redef fun tpl_definition do
                var tpl = new TplDefinition
+               var mdoc = mdoc_or_fallback
                if mdoc != null then
                        tpl.comment = mdoc.tpl_comment
                end
@@@ -213,6 -214,7 +214,7 @@@ redef class MGrou
  
        redef fun tpl_definition do
                var tpl = new TplDefinition
+               var mdoc = mdoc_or_fallback
                if mdoc != null then
                        tpl.comment = mdoc.tpl_comment
                end
@@@ -610,28 -612,6 +612,28 @@@ redef class MVirtualTypeDe
        end
  end
  
 +redef class MInnerClass
 +      redef fun nitdoc_url do return inner.nitdoc_url
 +      redef fun tpl_signature do return inner.tpl_signature
 +end
 +
 +redef class MInnerClassDef
 +      redef fun nitdoc_url do return inner.nitdoc_url
 +
 +      redef fun tpl_anchor do return inner.tpl_anchor
 +      redef fun tpl_link do return inner.tpl_link
 +      redef fun tpl_signature do return inner.tpl_signature
 +
 +      redef fun tpl_definition do
 +              var tpl = new TplClassDefinition
 +              tpl.namespace = mclassdef.tpl_namespace
 +              if mdoc != null then
 +                      tpl.comment = mdoc.tpl_comment
 +              end
 +              return tpl
 +      end
 +end
 +
  redef class MType
        fun tpl_signature: Template is abstract
  end