tests: error_syntax errors on `? now
[nit.git] / contrib / neo_doxygen / src / model / graph.nit
index 7c8d2a3..9df491a 100644 (file)
@@ -18,6 +18,7 @@ module model::graph
 import neo4j
 import more_collections
 import location
+import descriptions
 
 # A Neo4j graph.
 class NeoGraph
@@ -135,7 +136,7 @@ abstract class Entity
        var full_name: nullable String = null is writable
 
        # Associated documentation.
-       var doc = new JsonArray is writable
+       var doc = new Documentation is writable
 
        init do
                self.labels.add(graph.project_name)
@@ -166,20 +167,20 @@ abstract class Entity
        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.
        #
        # Called by the loader when it has finished to read the entity.
        fun put_in_graph do
-               if doc.length > 0 then
+               if not doc.is_empty then
                        set_mdoc
                end
                graph.all_nodes.add(self)
@@ -201,12 +202,12 @@ abstract class CodeBlock
        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
@@ -220,7 +221,7 @@ end
 abstract class Compound
        super Entity
 
-       # Set the declared visibility (the proctection) of the compound.
+       # Set the declared visibility (the protection) of the compound.
        fun visibility=(visibility: String) do
                self["visibility"] = visibility
        end
@@ -232,7 +233,7 @@ abstract class Compound
 
        # Declare an inner namespace.
        #
-       # Note: Althought Doxygen indicates that the name is optional,
+       # Note: Although Doxygen indicates that the name is optional,
        # declarations with an empty name are not supported yet, except for the root
        # namespace. For the root namespace, both arguments are empty.
        #
@@ -245,7 +246,7 @@ abstract class Compound
 
        # Declare an inner class.
        #
-       # Note: Althought Doxygen indicates that both arguments are optional,
+       # Note: Although Doxygen indicates that both arguments are optional,
        # declarations with an empty ID are not supported yet.
        #
        # Parameters:
@@ -291,7 +292,7 @@ class Namespace
                self.labels.add("MGroup")
        end
 
-       redef fun declare_namespace(id: String, full_name: String) do
+       redef fun declare_namespace(id, full_name) do
                inner_namespaces.add new NamespaceRef(id, full_name)
        end