end
# Parse the attributes of a `location` element.
- protected fun get_location(atts: Attributes): Location do
- var location = new Location
+ protected fun get_location(atts: Attributes): neo_doxygen::Location do
+ var location = new neo_doxygen::Location
location.path = atts.value_ns("", "bodyfile") or else atts.value_ns("", "file")
# Doxygen may indicate `[generated]`.
class_def.name = name
end
- redef fun location=(location: nullable Location) do
+ redef fun location=(location) do
super
class_def.location = location
end
fun ns_separator: String do return "::"
# Set the location of the entity in the source code.
- fun location=(location: nullable Location) do
+ fun location=(location: nullable neo_doxygen::Location) do
self["location"] = location
end
# Get the location of the entity in the source code.
- fun location: nullable Location do
- return self["location"].as(nullable Location)
+ fun location: nullable neo_doxygen::Location do
+ return self["location"].as(nullable neo_doxygen::Location)
end
# Put the entity in the graph.
super Entity
init do
- self["location"] = new Location
+ self["location"] = new neo_doxygen::Location
end
- redef fun location=(location: nullable Location) do
+ redef fun location=(location) do
if location == null then
- super(new Location)
+ super(new neo_doxygen::Location)
else
super
end
# This module is used to model locations in source files.
module location
-import json::static
import json
# A location inside a source file.
super
end
- redef fun location=(location: nullable Location) do
+ redef fun location=(location) do
super
for m in inner_namespaces do m.location = location
end
var d_ns = new Namespace(graph)
var buffer = new Buffer
var root_ns = graph.by_id[""].as(Namespace)
-var location: Location
+var location
file.name = "Bar.java"
file.model_id = "_Bar_8java"
-location = new Location
+location = new neo_doxygen::Location
location.path = "a/b/Bar.java"
file.location = location
file.declare_class("classa_b_bar", "a::b::Bar", "package")
file_2.name = "Bar.java"
file_2.model_id = "_Bar_8java_2"
-location = new Location
+location = new neo_doxygen::Location
location.path = "Bar.java"
file_2.location = location
file_2.declare_namespace("namespacec", "c")
bar_class.model_id = "classa_b_bar"
bar_class.name = "Bar"
-location = new Location
+location = new neo_doxygen::Location
location.path = "a/b/Bar.class"
location.line_start = 5
location.column_start = 1
baz_class.model_id = "classbaz"
baz_class.name = "Baz"
-location = new Location
+location = new neo_doxygen::Location
location.path = "Baz.jar"
baz_class.location = location
baz_class.put_in_graph