ni_nitdoc: Namespace in mclassdef
authorStefan Lage <lagestfan@gmail.com>
Fri, 28 Jun 2013 21:46:45 +0000 (17:46 -0400)
committerStefan Lage <lagestfan@gmail.com>
Wed, 3 Jul 2013 20:54:24 +0000 (16:54 -0400)
Signed-off-by: Stefan Lage <lagestfan@gmail.com>

src/ni_nitdoc.nit

index 6e10c50..c0d0e42 100644 (file)
@@ -1082,6 +1082,19 @@ redef class AMethPropdef
        end
 end
 
+redef class MClassDef
+       private fun namespace(mclass: MClass): String do
+
+               if mmodule.public_owner is null then
+                       return "{mmodule.full_name}::{mclass.name}"
+               else if mclass is self.mclass then
+                       return "{mmodule.public_owner.name}::{mclass.name}"
+               else
+                       return "{mmodule.public_owner.name}::<a href=\"{mclass.name}.html\">{mclass.name}</a>"
+               end
+       end
+end
+
 # Create a tool context to handle options and paths
 var toolcontext = new ToolContext
 toolcontext.process_options