neo_doxygen: Manage top-level namespaces in `doxml`.
authorJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Mon, 15 Dec 2014 21:22:20 +0000 (16:22 -0500)
committerJean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
Tue, 16 Dec 2014 15:33:40 +0000 (10:33 -0500)
Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

contrib/neo_doxygen/src/doxml/doxyname.nit
contrib/neo_doxygen/src/model/graph.nit
contrib/neo_doxygen/src/tests/neo_doxygen_file_compound.nit
tests/sav/neo_doxygen_dump_args4.res
tests/sav/neo_doxygen_dump_args5.res
tests/sav/neo_doxygen_file_compound.res

index 4676344..65637df 100644 (file)
@@ -46,9 +46,16 @@ end
 
 redef class Namespace
        # Set the `name` and the `full_name` using the specified name generated by Doxygen.
+       #
+       # Warning: This method assumes that `model_id` is already set.
        redef fun doxyname=(doxyname: String) do
                full_name = doxyname
                super
+               if doxyname == name and model_id != "" then
+                       # Doxygen does not represent the root namespace.
+                       # So, we have to link the root namespace with its children manually.
+                       graph.by_id[""].as(Namespace).declare_namespace(model_id, doxyname)
+               end
        end
 end
 
index 18f91c4..6d127cd 100644 (file)
@@ -310,8 +310,6 @@ class Namespace
        super Compound
 
        # The inner namespaces.
-       #
-       # Left empty for the root namespace.
        var inner_namespaces: SimpleCollection[NamespaceRef] = new Array[NamespaceRef]
 
        init do
@@ -336,12 +334,6 @@ class Namespace
        redef fun put_edges do
                super
                graph.add_edge(self, "PROJECT", graph.project)
-               if self["name"] == self["full_name"] and self["full_name"] != "" then
-                       # The root namespace does not know its children.
-                       var root = graph.by_id[""]
-                       graph.add_edge(self, "PARENT", root)
-                       graph.add_edge(root, "NESTS", self)
-               end
                for ns in inner_namespaces do
                        var node = ns.seek_in(graph)
                        graph.add_edge(node, "PARENT", self)
@@ -391,6 +383,4 @@ class RootNamespace
                self["full_name"] = ""
                self["name"] = graph.project_name
        end
-
-       redef fun declare_namespace(id: String, name: String) do end
 end
index 15a7531..f8af04f 100644 (file)
@@ -25,9 +25,14 @@ var b_ns = new Namespace(graph)
 var c_ns = new Namespace(graph)
 var d_ns = new Namespace(graph)
 var buffer = new RopeBuffer
+var root_ns = graph.by_id[""].as(Namespace)
+var location: Location
 
 file.full_name = "Bar.java"
 file.model_id = "_Bar_8java"
+location = new Location
+location.path = "a/b/Bar.java"
+file.location = location
 file.declare_class("classa_b_bar", "a::b::Bar", "package")
 file.declare_class("classbaz", "Baz", "")
 file.declare_namespace("", "a::b")
@@ -35,18 +40,35 @@ file.put_in_graph
 
 file_2.full_name = "Bar.java"
 file_2.model_id = "_Bar_8java_2"
+location = new Location
+location.path = "Bar.java"
+file_2.location = location
 file_2.declare_namespace("namespacec", "c")
 file_2.declare_namespace("", "d")
 file_2.put_in_graph
 
 bar_class.model_id = "classa_b_bar"
 bar_class.full_name = "a::b::Bar"
+location = new Location
+location.path = "a/b/Bar.class"
+location.line_start = 5
+location.column_start = 1
+location.line_end = 100
+location.column_end = 10
+bar_class.location = location
 bar_class.put_in_graph
 
 baz_class.model_id = "classbaz"
 baz_class.full_name = "Baz"
+location = new Location
+location.path = "Baz.jar"
+baz_class.location = location
 baz_class.put_in_graph
 
+root_ns.declare_namespace("", "a")
+root_ns.declare_namespace("namespacec", "c")
+root_ns.declare_namespace("", "d")
+
 a_ns.full_name = "a"
 a_ns.declare_namespace("", "a::b")
 a_ns.put_in_graph
index 2aaa241..76eb5d1 100644 (file)
@@ -49,6 +49,50 @@ Edge
 
 
 Edge
+=type=6:PARENT
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#12:namespaceorg
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(5):
+{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
+----
+=to=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+
+
+Edge
+=type=5:NESTS
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+----
+=to=Entity#12:namespaceorg
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(5):
+{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
+
+
+Edge
 =type=8:DECLARES
 =properties=JsonObject(0):
 {}
@@ -1777,50 +1821,6 @@ Edge
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#12:namespaceorg
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(5):
-{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
-----
-=to=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-
-
-Edge
-=type=5:NESTS
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-----
-=to=Entity#12:namespaceorg
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(5):
-{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
-
-
-Edge
-=type=6:PARENT
-=properties=JsonObject(0):
-{}
-----
 =from=Entity#23:namespaceorg_1_1example
 =labels=Array(3):
 3:foo
index f376409..6ea019e 100644 (file)
@@ -49,6 +49,50 @@ Edge
 
 
 Edge
+=type=6:PARENT
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#12:namespaceorg
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(5):
+{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
+----
+=to=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+
+
+Edge
+=type=5:NESTS
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+----
+=to=Entity#12:namespaceorg
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(5):
+{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
+
+
+Edge
 =type=8:DECLARES
 =properties=JsonObject(0):
 {}
@@ -1777,50 +1821,6 @@ Edge
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#12:namespaceorg
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(5):
-{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
-----
-=to=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-
-
-Edge
-=type=5:NESTS
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-----
-=to=Entity#12:namespaceorg
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(5):
-{"kind":"namespace","visibility":"","full_name":"org","name":"org","location":"\/dev\/null:1,1--1,1"}
-
-
-Edge
-=type=6:PARENT
-=properties=JsonObject(0):
-{}
-----
 =from=Entity#23:namespaceorg_1_1example
 =labels=Array(3):
 3:foo
index ab885c0..805f702 100644 (file)
@@ -43,6 +43,132 @@ Edge
 {"name":"foo"}
 
 Edge
+=type=6:PARENT
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"a","name":"a"}
+----
+=to=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+
+Edge
+=type=5:NESTS
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+----
+=to=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"a","name":"a"}
+
+Edge
+=type=6:PARENT
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#10:namespacec
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"c","name":"c"}
+----
+=to=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+
+Edge
+=type=5:NESTS
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+----
+=to=Entity#10:namespacec
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"c","name":"c"}
+
+Edge
+=type=6:PARENT
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#10:namespaced
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"d","name":"d"}
+----
+=to=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+
+Edge
+=type=5:NESTS
+=properties=JsonObject(0):
+{}
+----
+=from=Entity#0:
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
+----
+=to=Entity#10:namespaced
+=labels=Array(3):
+3:foo
+7:MEntity
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"d","name":"d"}
+
+Edge
 =type=8:DECLARES
 =properties=JsonObject(0):
 {}
@@ -61,7 +187,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
 
 Edge
 =type=10:INTRODUCES
@@ -74,15 +200,15 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#12:classa_b_bar
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 
 Edge
 =type=7:DEFINES
@@ -95,7 +221,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#0:
 =labels=Array(3):
@@ -103,7 +229,7 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.class:5,1--100,10","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
 
 Edge
 =type=8:DECLARES
@@ -124,7 +250,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"c::Bar"}
+{"location":"Bar.java:1,1--1,1","name":"Bar","full_name":"c::Bar"}
 
 Edge
 =type=8:DECLARES
@@ -145,7 +271,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"d::Bar"}
+{"location":"Bar.java:1,1--1,1","name":"Bar","full_name":"d::Bar"}
 
 Edge
 =type=9:CLASSTYPE
@@ -157,8 +283,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -188,8 +314,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 
 Edge
 =type=9:BOUNDTYPE
@@ -202,7 +328,7 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.class:5,1--100,10","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -224,15 +350,15 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.class:5,1--100,10","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#12:classa_b_bar
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 
 Edge
 =type=9:CLASSTYPE
@@ -244,8 +370,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz","location":"Baz.jar:1,1--1,1"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -275,8 +401,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz","location":"Baz.jar:1,1--1,1"}
 
 Edge
 =type=9:BOUNDTYPE
@@ -289,7 +415,7 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
+{"location":"Baz.jar:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -311,15 +437,15 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
+{"location":"Baz.jar:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
 ----
 =to=Entity#8:classbaz
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz","location":"Baz.jar:1,1--1,1"}
 
 Edge
 =type=7:PROJECT
@@ -353,7 +479,7 @@ Edge
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"a","name":"a"}
+{"full_name":"a::b","name":"b"}
 ----
 =to=Entity#0:
 =labels=Array(3):
@@ -361,7 +487,7 @@ Edge
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"","name":"foo"}
+{"full_name":"a","name":"a"}
 
 Edge
 =type=5:NESTS
@@ -374,7 +500,7 @@ Edge
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"","name":"foo"}
+{"full_name":"a","name":"a"}
 ----
 =to=Entity#0:
 =labels=Array(3):
@@ -382,10 +508,10 @@ Edge
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"a","name":"a"}
+{"full_name":"a::b","name":"b"}
 
 Edge
-=type=6:PARENT
+=type=7:PROJECT
 =properties=JsonObject(0):
 {}
 ----
@@ -397,47 +523,47 @@ Edge
 =properties=JsonObject(2):
 {"full_name":"a::b","name":"b"}
 ----
-=to=Entity#0:
+=to=Node
 =labels=Array(3):
 3:foo
 7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"a","name":"a"}
+8:MProject
+=properties=JsonObject(1):
+{"name":"foo"}
 
 Edge
-=type=5:NESTS
+=type=7:PROJECT
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#0:
+=from=Entity#10:namespacec
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"a","name":"a"}
+{"full_name":"c","name":"c"}
 ----
-=to=Entity#0:
+=to=Node
 =labels=Array(3):
 3:foo
 7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"a::b","name":"b"}
+8:MProject
+=properties=JsonObject(1):
+{"name":"foo"}
 
 Edge
 =type=7:PROJECT
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#0:
+=from=Entity#10:namespaced
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"a::b","name":"b"}
+{"full_name":"d","name":"d"}
 ----
 =to=Node
 =labels=Array(3):
@@ -447,50 +573,53 @@ Edge
 =properties=JsonObject(1):
 {"name":"foo"}
 
+
+---===WITH GLOBALS===---
+# Graph
 Edge
-=type=7:PROJECT
+=type=4:ROOT
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#10:namespacec
+=from=Node
 =labels=Array(3):
 3:foo
 7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"c","name":"c"}
+8:MProject
+=properties=JsonObject(1):
+{"name":"foo"}
 ----
-=to=Node
+=to=Entity#0:
 =labels=Array(3):
 3:foo
 7:MEntity
-8:MProject
-=properties=JsonObject(1):
-{"name":"foo"}
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"","name":"foo"}
 
 Edge
-=type=6:PARENT
+=type=7:PROJECT
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#10:namespacec
+=from=Entity#0:
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"c","name":"c"}
+{"full_name":"","name":"foo"}
 ----
-=to=Entity#0:
+=to=Node
 =labels=Array(3):
 3:foo
 7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
+8:MProject
+=properties=JsonObject(1):
+{"name":"foo"}
 
 Edge
-=type=5:NESTS
+=type=6:PARENT
 =properties=JsonObject(0):
 {}
 ----
@@ -500,49 +629,49 @@ Edge
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"","name":"foo"}
+{"full_name":"a","name":"a"}
 ----
-=to=Entity#10:namespacec
+=to=Entity#0:
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"c","name":"c"}
+{"full_name":"","name":"foo"}
 
 Edge
-=type=7:PROJECT
+=type=5:NESTS
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#10:namespaced
+=from=Entity#0:
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"d","name":"d"}
+{"full_name":"","name":"foo"}
 ----
-=to=Node
+=to=Entity#0:
 =labels=Array(3):
 3:foo
 7:MEntity
-8:MProject
-=properties=JsonObject(1):
-{"name":"foo"}
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"a","name":"a"}
 
 Edge
 =type=6:PARENT
 =properties=JsonObject(0):
 {}
 ----
-=from=Entity#10:namespaced
+=from=Entity#10:namespacec
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"d","name":"d"}
+{"full_name":"c","name":"c"}
 ----
 =to=Entity#0:
 =labels=Array(3):
@@ -565,29 +694,26 @@ Edge
 =properties=JsonObject(2):
 {"full_name":"","name":"foo"}
 ----
-=to=Entity#10:namespaced
+=to=Entity#10:namespacec
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"d","name":"d"}
-
+{"full_name":"c","name":"c"}
 
----===WITH GLOBALS===---
-# Graph
 Edge
-=type=4:ROOT
+=type=6:PARENT
 =properties=JsonObject(0):
 {}
 ----
-=from=Node
+=from=Entity#10:namespaced
 =labels=Array(3):
 3:foo
 7:MEntity
-8:MProject
-=properties=JsonObject(1):
-{"name":"foo"}
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"d","name":"d"}
 ----
 =to=Entity#0:
 =labels=Array(3):
@@ -598,7 +724,7 @@ Edge
 {"full_name":"","name":"foo"}
 
 Edge
-=type=7:PROJECT
+=type=5:NESTS
 =properties=JsonObject(0):
 {}
 ----
@@ -610,13 +736,13 @@ Edge
 =properties=JsonObject(2):
 {"full_name":"","name":"foo"}
 ----
-=to=Node
+=to=Entity#10:namespaced
 =labels=Array(3):
 3:foo
 7:MEntity
-8:MProject
-=properties=JsonObject(1):
-{"name":"foo"}
+6:MGroup
+=properties=JsonObject(2):
+{"full_name":"d","name":"d"}
 
 Edge
 =type=8:DECLARES
@@ -637,7 +763,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
 
 Edge
 =type=10:INTRODUCES
@@ -650,15 +776,15 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#12:classa_b_bar
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 
 Edge
 =type=7:DEFINES
@@ -671,7 +797,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#0:
 =labels=Array(3):
@@ -679,7 +805,7 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.class:5,1--100,10","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
 
 Edge
 =type=8:DECLARES
@@ -700,7 +826,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"c::Bar"}
+{"location":"Bar.java:1,1--1,1","name":"Bar","full_name":"c::Bar"}
 
 Edge
 =type=8:DECLARES
@@ -721,7 +847,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"d::Bar"}
+{"location":"Bar.java:1,1--1,1","name":"Bar","full_name":"d::Bar"}
 
 Edge
 =type=9:CLASSTYPE
@@ -733,8 +859,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -764,8 +890,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 
 Edge
 =type=9:BOUNDTYPE
@@ -778,7 +904,7 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.class:5,1--100,10","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -800,15 +926,15 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
+{"location":"a\/b\/Bar.class:5,1--100,10","is_intro":true,"name":"Bar","full_name":"a::b::Bar"}
 ----
 =to=Entity#12:classa_b_bar
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"a::b::Bar","name":"Bar","location":"a\/b\/Bar.class:5,1--100,10"}
 
 Edge
 =type=9:CLASSTYPE
@@ -820,8 +946,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz","location":"Baz.jar:1,1--1,1"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -851,8 +977,8 @@ Edge
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz","location":"Baz.jar:1,1--1,1"}
 
 Edge
 =type=9:BOUNDTYPE
@@ -865,7 +991,7 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
+{"location":"Baz.jar:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
 ----
 =to=Entity#0:
 =labels=Array(4):
@@ -887,15 +1013,15 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
+{"location":"Baz.jar:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
 ----
 =to=Entity#8:classbaz
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz","location":"Baz.jar:1,1--1,1"}
 
 Edge
 =type=7:PROJECT
@@ -929,48 +1055,6 @@ Edge
 7:MEntity
 6:MGroup
 =properties=JsonObject(2):
-{"full_name":"a","name":"a"}
-----
-=to=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-
-Edge
-=type=5:NESTS
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-----
-=to=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"a","name":"a"}
-
-Edge
-=type=6:PARENT
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
 {"full_name":"a::b","name":"b"}
 ----
 =to=Entity#0:
@@ -1045,48 +1129,6 @@ Edge
 {"name":"foo"}
 
 Edge
-=type=6:PARENT
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#10:namespacec
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"c","name":"c"}
-----
-=to=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-
-Edge
-=type=5:NESTS
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-----
-=to=Entity#10:namespacec
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"c","name":"c"}
-
-Edge
 =type=7:PROJECT
 =properties=JsonObject(0):
 {}
@@ -1108,48 +1150,6 @@ Edge
 {"name":"foo"}
 
 Edge
-=type=6:PARENT
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#10:namespaced
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"d","name":"d"}
-----
-=to=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-
-Edge
-=type=5:NESTS
-=properties=JsonObject(0):
-{}
-----
-=from=Entity#0:
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"","name":"foo"}
-----
-=to=Entity#10:namespaced
-=labels=Array(3):
-3:foo
-7:MEntity
-6:MGroup
-=properties=JsonObject(2):
-{"full_name":"d","name":"d"}
-
-Edge
 =type=8:DECLARES
 =properties=JsonObject(0):
 {}
@@ -1168,7 +1168,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"Bar"}
 
 Edge
 =type=10:INTRODUCES
@@ -1181,15 +1181,15 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"Bar"}
 ----
 =to=Entity#8:classbaz
 =labels=Array(3):
 3:foo
 7:MEntity
 6:MClass
-=properties=JsonObject(4):
-{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz"}
+=properties=JsonObject(5):
+{"kind":"class","visibility":"public","full_name":"Baz","name":"Baz","location":"Baz.jar:1,1--1,1"}
 
 Edge
 =type=7:DEFINES
@@ -1202,7 +1202,7 @@ Edge
 7:MEntity
 7:MModule
 =properties=JsonObject(3):
-{"location":"\/dev\/null:1,1--1,1","name":"Bar","full_name":"Bar"}
+{"location":"a\/b\/Bar.java:1,1--1,1","name":"Bar","full_name":"Bar"}
 ----
 =to=Entity#0:
 =labels=Array(3):
@@ -1210,6 +1210,6 @@ Edge
 7:MEntity
 9:MClassDef
 =properties=JsonObject(4):
-{"location":"\/dev\/null:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}
+{"location":"Baz.jar:1,1--1,1","is_intro":true,"name":"Baz","full_name":"Baz"}