neo_doxygen: Include namespaces’ members.
[nit.git] / contrib / neo_doxygen / src / model / module_compound.nit
index 404bcac..c95cb84 100644 (file)
@@ -17,6 +17,7 @@ module model::module_compound
 
 import graph
 import class_compound
+import namespace_members
 
 # A source file.
 #
@@ -146,8 +147,14 @@ private class Module
                parent_name = namespace.full_name
        end
 
+       redef fun put_in_graph do
+               super
+       end
+
        redef fun put_edges do
                var ns_compound = namespace.seek_in(graph)
+               var self_class = ns_compound.self_class
+
                graph.add_edge(ns_compound, "DECLARES", self)
 
                for c in file_compound.inner_classes do
@@ -156,6 +163,13 @@ private class Module
                        graph.add_edge(self, "INTRODUCES", class_compound)
                        graph.add_edge(self, "DEFINES", class_compound.class_def)
                end
+
+               if self_class isa SelfClass then
+                       # We assume that only one file is linked to the namespace.
+                       # TODO When Doxygen will provide a way to know which file defines which member, use it.
+                       graph.add_edge(self, "INTRODUCES", self_class)
+                       graph.add_edge(self, "DEFINES", self_class.class_def)
+               end
        end
 end