From: Jean-Christophe Beaupré Date: Tue, 9 Dec 2014 20:53:12 +0000 (-0500) Subject: neo_doxygen: Set the location of implicit classes. X-Git-Tag: v0.7~33^2~1 X-Git-Url: http://nitlanguage.org neo_doxygen: Set the location of implicit classes. Signed-off-by: Jean-Christophe Beaupré --- diff --git a/contrib/neo_doxygen/src/model/module_compound.nit b/contrib/neo_doxygen/src/model/module_compound.nit index c95cb84..301fc23 100644 --- a/contrib/neo_doxygen/src/model/module_compound.nit +++ b/contrib/neo_doxygen/src/model/module_compound.nit @@ -167,6 +167,7 @@ private class Module 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. + self_class.location = file_compound.location graph.add_edge(self, "INTRODUCES", self_class) graph.add_edge(self, "DEFINES", self_class.class_def) end diff --git a/tests/sav/neo_doxygen_namespace_members.res b/tests/sav/neo_doxygen_namespace_members.res index c591293..e38767b 100644 --- a/tests/sav/neo_doxygen_namespace_members.res +++ b/tests/sav/neo_doxygen_namespace_members.res @@ -80,8 +80,8 @@ Edge 3:foo 7:MEntity 6:MClass -=properties=JsonObject(4): -{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)"} +=properties=JsonObject(5): +{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)","location":"\/dev\/null:1,1--1,1"} Edge =type=7:DEFINES @@ -200,8 +200,8 @@ Edge 3:foo 7:MEntity 6:MClass -=properties=JsonObject(4): -{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)"} +=properties=JsonObject(5): +{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)","location":"\/dev\/null:1,1--1,1"} ---- =to=Entity#0: =labels=Array(4): @@ -231,8 +231,8 @@ Edge 3:foo 7:MEntity 6:MClass -=properties=JsonObject(4): -{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)"} +=properties=JsonObject(5): +{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)","location":"\/dev\/null:1,1--1,1"} Edge =type=9:BOUNDTYPE @@ -274,8 +274,8 @@ Edge 3:foo 7:MEntity 6:MClass -=properties=JsonObject(4): -{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)"} +=properties=JsonObject(5): +{"kind":"class","visibility":"public","name":"(self)","full_name":"foo::(self)","location":"\/dev\/null:1,1--1,1"} Edge =type=10:INTRODUCES