From 3e360759a4fea0d10047280142e90b1fdb3a6ba4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Christophe=20Beaupr=C3=A9?= Date: Tue, 9 Dec 2014 15:53:12 -0500 Subject: [PATCH] neo_doxygen: Set the location of implicit classes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Christophe Beaupré --- contrib/neo_doxygen/src/model/module_compound.nit | 1 + tests/sav/neo_doxygen_namespace_members.res | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) 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 -- 1.7.9.5