model: move model_json to doc/templates
authorAlexandre Terrasa <alexandre@moz-code.org>
Fri, 10 Nov 2017 20:47:03 +0000 (15:47 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Mon, 18 Dec 2017 18:59:12 +0000 (13:59 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/doc/commands/commands_json.nit
src/doc/templates/templates_json.nit [moved from src/model/model_json.nit with 99% similarity]
src/doc/templates/tests/test_templates_json.nit [moved from src/model/test_model_json.nit with 95% similarity]
src/doc/templates/tests/test_templates_json.sav/test_classdefs_to_full_json.res [moved from src/model/test_model_json.sav/test_classdefs_to_full_json.res with 85% similarity]
src/doc/templates/tests/test_templates_json.sav/test_classes_to_full_json.res [moved from src/model/test_model_json.sav/test_classes_to_full_json.res with 85% similarity]
src/doc/templates/tests/test_templates_json.sav/test_groups_to_full_json.res [moved from src/model/test_model_json.sav/test_groups_to_full_json.res with 86% similarity]
src/doc/templates/tests/test_templates_json.sav/test_modules_to_full_json.res [moved from src/model/test_model_json.sav/test_modules_to_full_json.res with 88% similarity]
src/doc/templates/tests/test_templates_json.sav/test_packages_to_full_json.res [moved from src/model/test_model_json.sav/test_packages_to_full_json.res with 100% similarity]
src/doc/templates/tests/test_templates_json.sav/test_propdefs_to_full_json.res [moved from src/model/test_model_json.sav/test_propdefs_to_full_json.res with 91% similarity]
src/doc/templates/tests/test_templates_json.sav/test_props_to_full_json.res [moved from src/model/test_model_json.sav/test_props_to_full_json.res with 96% similarity]
src/doc/templates/tests/test_templates_json.sav/test_refs_to_full_json.res [moved from src/model/test_model_json.sav/test_refs_to_full_json.res with 84% similarity]

index 05fcf95..018a028 100644 (file)
@@ -20,9 +20,8 @@ import commands::commands_graph
 import commands::commands_usage
 import commands::commands_catalog
 
-import model::model_json
+import templates::templates_json
 import catalog::catalog_json
-import doc::doc_down
 
 redef class DocCommand
        # Return a JSON Serializable representation of `self` results
similarity index 99%
rename from src/model/model_json.nit
rename to src/doc/templates/templates_json.nit
index 2b78692..a75dc49 100644 (file)
@@ -22,7 +22,7 @@
 # rather than the refs.
 #
 # TODO consider serialization module?
-module model_json
+module templates_json
 
 import model::model_collect
 import json::static
similarity index 95%
rename from src/model/test_model_json.nit
rename to src/doc/templates/tests/test_templates_json.nit
index 2dcc415..f1ba536 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-module test_model_json is test
+module test_templates_json is test
 
-import model_json
+import templates_json
 import frontend
 
 class TestModelSerialization
        test
 
        var suite_path: String = "NIT_TESTING_PATH".environ
-       var lib_path: String = "{suite_path.dirname}/../../tests/test_prog"
+       var lib_path: String = "{suite_path.dirname}/../../../../tests/test_prog"
 
        var mainmodule: MModule is noinit
 
 }
 {
        "name": "MyGame",
+       "synopsis": "This is an example of how to implement the Game interface",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }],
        "class_name": "MClassDef",
        "full_name": "test_prog$MyGame",
-       "mdoc": {
-               "content": "This is an example of how to implement the Game interface",
-               "location": {
-                       "column_end": 0,
-                       "column_start": 1,
-                       "line_end": 20,
-                       "line_start": 19,
-                       "file": "test_location"
-               }
-       },
        "visibility": "public",
+       "html_synopsis": "<span class=\"synopsys nitdoc\">This is an example of how to implement the Game interface</span>",
        "modifiers": ["class"],
-       "location": {
-               "column_end": 3,
-               "column_start": 1,
-               "line_end": 32,
-               "line_start": 19,
-               "file": "test_location"
-       },
-       "is_intro": true,
-       "mparameters": [],
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mclass": {
-               "full_name": "test_prog::MyGame"
-       },
-       "mpropdefs": [{
-               "full_name": "test_prog$MyGame$_computer_characters"
-       }, {
-               "full_name": "test_prog$MyGame$_player_characters"
-       }, {
-               "full_name": "test_prog$MyGame$Game::computer_characters"
-       }, {
-               "full_name": "test_prog$MyGame$computer_characters="
-       }, {
-               "full_name": "test_prog$MyGame$Game::pause_game"
-       }, {
-               "full_name": "test_prog$MyGame$Game::player_characters"
-       }, {
-               "full_name": "test_prog$MyGame$player_characters="
-       }, {
-               "full_name": "test_prog$MyGame$Game::start_game"
-       }, {
-               "full_name": "test_prog$MyGame$Game::stop_game"
-       }],
-       "intro_mproperties": [{
-               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
-       }, {
-               "full_name": "test_prog::game_examples::MyGame::_player_characters"
-       }, {
-               "full_name": "test_prog::MyGame::computer_characters="
-       }, {
-               "full_name": "test_prog::MyGame::player_characters="
-       }],
-       "intro": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
-       "intro_mpropdefs": [{
-               "full_name": "test_prog$MyGame$_computer_characters"
-       }, {
-               "full_name": "test_prog$MyGame$_player_characters"
-       }, {
-               "full_name": "test_prog$MyGame$computer_characters="
-       }, {
-               "full_name": "test_prog$MyGame$player_characters="
-       }],
-       "redef_mpropdefs": [{
-               "full_name": "test_prog$MyGame$Game::computer_characters"
-       }, {
-               "full_name": "test_prog$MyGame$Game::pause_game"
-       }, {
-               "full_name": "test_prog$MyGame$Game::player_characters"
-       }, {
-               "full_name": "test_prog$MyGame$Game::start_game"
-       }, {
-               "full_name": "test_prog$MyGame$Game::stop_game"
-       }]
+       "is_intro": true
 }
 {
        "name": "Starter",
 }
 {
        "name": "MyGame",
+       "synopsis": "This is an example of how to implement the Game interface",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "::", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }],
        "class_name": "MClass",
        "full_name": "test_prog::MyGame",
-       "mdoc": {
-               "content": "This is an example of how to implement the Game interface",
-               "location": {
-                       "column_end": 0,
-                       "column_start": 1,
-                       "line_end": 20,
-                       "line_start": 19,
-                       "file": "test_location"
-               }
-       },
        "visibility": "public",
-       "modifiers": ["class"],
-       "location": {
-               "column_end": 3,
-               "column_start": 1,
-               "line_end": 32,
-               "line_start": 19,
-               "file": "test_location"
-       },
-       "mparameters": [],
-       "intro": {
-               "full_name": "test_prog$MyGame"
-       },
-       "intro_mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
-       "mclassdefs": [{
-               "full_name": "test_prog$MyGame"
-       }],
-       "all_mproperties": [{
-               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
-       }, {
-               "full_name": "test_prog::game_examples::MyGame::_player_characters"
-       }, {
-               "full_name": "test_prog::Game::computer_characters"
-       }, {
-               "full_name": "test_prog::MyGame::computer_characters="
-       }, {
-               "full_name": "test_prog::Game::pause_game"
-       }, {
-               "full_name": "test_prog::Game::player_characters"
-       }, {
-               "full_name": "test_prog::MyGame::player_characters="
-       }, {
-               "full_name": "test_prog::Game::start_game"
-       }, {
-               "full_name": "test_prog::Game::stop_game"
-       }],
-       "intro_mproperties": [{
-               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
-       }, {
-               "full_name": "test_prog::game_examples::MyGame::_player_characters"
-       }, {
-               "full_name": "test_prog::MyGame::computer_characters="
-       }, {
-               "full_name": "test_prog::MyGame::player_characters="
-       }],
-       "redef_mproperties": [{
-               "full_name": "test_prog::Game::computer_characters"
-       }, {
-               "full_name": "test_prog::Game::pause_game"
-       }, {
-               "full_name": "test_prog::Game::player_characters"
-       }, {
-               "full_name": "test_prog::Game::start_game"
-       }, {
-               "full_name": "test_prog::Game::stop_game"
-       }],
-       "parents": []
+       "html_synopsis": "<span class=\"synopsys nitdoc\">This is an example of how to implement the Game interface</span>",
+       "modifiers": ["class"]
 }
 {
        "name": "Starter",
        "modifiers": ["group"]
 }
 {
+       "name": "examples",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, ">", {
+               "name": "examples"
+       }, ">"],
+       "class_name": "MGroup",
+       "full_name": "test_prog>examples>",
+       "visibility": "public",
+       "modifiers": ["group"]
+}
+{
        "name": "game",
        "synopsis": "Gaming group",
        "namespace": [{
@@ -1,36 +1,15 @@
 {
        "name": "game_examples",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "::", {
+               "name": "game_examples"
+       }],
        "class_name": "MModule",
        "full_name": "test_prog::game_examples",
-       "mdoc": null,
        "visibility": "public",
-       "modifiers": ["module"],
-       "location": {
-               "column_end": 3,
-               "column_start": 1,
-               "line_end": 32,
-               "line_start": 15,
-               "file": "test_location"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "intro_mclasses": [{
-               "full_name": "test_prog::MyGame"
-       }],
-       "mclassdefs": [{
-               "full_name": "test_prog$MyGame"
-       }],
-       "intro_mclassdefs": [{
-               "full_name": "test_prog$MyGame"
-       }],
-       "redef_mclassdefs": [],
-       "imports": [{
-               "full_name": "test_prog::game"
-       }]
+       "modifiers": ["module"]
 }
 {
        "name": "excluded",
 }
 {
        "name": "player_characters",
+       "synopsis": "Characters played by human players.",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "Game",
+               "synopsis": "This is the interface you have to implement to use ure gaming platform."
+       }, "::", {
+               "name": "player_characters",
+               "synopsis": "Characters played by human players."
+       }],
        "class_name": "MMethodDef",
        "full_name": "test_prog$MyGame$Game::player_characters",
-       "mdoc": {
-               "content": "Characters played by human players.",
-               "location": {
-                       "column_end": 0,
-                       "column_start": 2,
-                       "line_end": 26,
-                       "line_start": 25,
-                       "file": "test_location"
-               }
-       },
        "visibility": "public",
+       "html_synopsis": "<span class=\"synopsys nitdoc\">Characters played by human players.</span>",
        "modifiers": ["redef", "fun"],
-       "location": {
-               "column_end": 50,
-               "column_start": 2,
-               "line_end": 23,
-               "line_start": 23,
-               "file": "test_location"
-       },
-       "is_intro": false,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::Game::player_characters"
-       },
-       "intro": {
-               "full_name": "test_prog$Game$player_characters"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$Game"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
        "msignature": {
                "arity": 0,
-               "mparams": [],
+               "mparameters": [],
                "return_mtype": {
-                       "full_name": "test_prog::List[test_prog::Character]"
-               },
-               "vararg_rank": -1
+                       "name": "List[Character]",
+                       "synopsis": "List of things.",
+                       "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
+               }
        }
 }
 {
 }
 {
        "name": "computer_characters",
+       "synopsis": "Characters players by computer.",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "Game",
+               "synopsis": "This is the interface you have to implement to use ure gaming platform."
+       }, "::", {
+               "name": "computer_characters",
+               "synopsis": "Characters players by computer."
+       }],
        "class_name": "MMethodDef",
        "full_name": "test_prog$MyGame$Game::computer_characters",
-       "mdoc": {
-               "content": "Characters players by computer.",
-               "location": {
-                       "column_end": 0,
-                       "column_start": 2,
-                       "line_end": 29,
-                       "line_start": 28,
-                       "file": "test_location"
-               }
-       },
        "visibility": "public",
+       "html_synopsis": "<span class=\"synopsys nitdoc\">Characters players by computer.</span>",
        "modifiers": ["redef", "fun"],
-       "location": {
-               "column_end": 52,
-               "column_start": 2,
-               "line_end": 25,
-               "line_start": 25,
-               "file": "test_location"
-       },
-       "is_intro": false,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::Game::computer_characters"
-       },
-       "intro": {
-               "full_name": "test_prog$Game$computer_characters"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$Game"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
        "msignature": {
                "arity": 0,
-               "mparams": [],
+               "mparameters": [],
                "return_mtype": {
-                       "full_name": "test_prog::List[test_prog::Character]"
-               },
-               "vararg_rank": -1
+                       "name": "List[Character]",
+                       "synopsis": "List of things.",
+                       "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
+               }
        }
 }
 {
 }
 {
        "name": "start_game",
+       "synopsis": "Start the game.",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "Game",
+               "synopsis": "This is the interface you have to implement to use ure gaming platform."
+       }, "::", {
+               "name": "start_game",
+               "synopsis": "Start the game."
+       }],
        "class_name": "MMethodDef",
        "full_name": "test_prog$MyGame$Game::start_game",
-       "mdoc": {
-               "content": "Start the game.\n\nYou have to implement that method!",
-               "location": {
-                       "column_end": 0,
-                       "column_start": 2,
-                       "line_end": 34,
-                       "line_start": 31,
-                       "file": "test_location"
-               }
-       },
        "visibility": "public",
+       "html_synopsis": "<span class=\"synopsys nitdoc\">Start the game.</span>",
        "modifiers": ["redef", "fun"],
-       "location": {
-               "column_end": 28,
-               "column_start": 2,
-               "line_end": 27,
-               "line_start": 27,
-               "file": "test_location"
-       },
-       "is_intro": false,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::Game::start_game"
-       },
-       "intro": {
-               "full_name": "test_prog$Game$start_game"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$Game"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
        "msignature": {
                "arity": 0,
-               "mparams": [],
-               "return_mtype": null,
-               "vararg_rank": -1
+               "mparameters": [],
+               "return_mtype": null
        }
 }
 {
 }
 {
        "name": "pause_game",
+       "synopsis": "Pause the game.",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "Game",
+               "synopsis": "This is the interface you have to implement to use ure gaming platform."
+       }, "::", {
+               "name": "pause_game",
+               "synopsis": "Pause the game."
+       }],
        "class_name": "MMethodDef",
        "full_name": "test_prog$MyGame$Game::pause_game",
-       "mdoc": {
-               "content": "Pause the game.\n\nYou have to implement that method!",
-               "location": {
-                       "column_end": 0,
-                       "column_start": 2,
-                       "line_end": 39,
-                       "line_start": 36,
-                       "file": "test_location"
-               }
-       },
        "visibility": "public",
+       "html_synopsis": "<span class=\"synopsys nitdoc\">Pause the game.</span>",
        "modifiers": ["redef", "fun"],
-       "location": {
-               "column_end": 28,
-               "column_start": 2,
-               "line_end": 29,
-               "line_start": 29,
-               "file": "test_location"
-       },
-       "is_intro": false,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::Game::pause_game"
-       },
-       "intro": {
-               "full_name": "test_prog$Game$pause_game"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$Game"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
        "msignature": {
                "arity": 0,
-               "mparams": [],
-               "return_mtype": null,
-               "vararg_rank": -1
+               "mparameters": [],
+               "return_mtype": null
        }
 }
 {
 }
 {
        "name": "stop_game",
+       "synopsis": "Stop the game.",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "Game",
+               "synopsis": "This is the interface you have to implement to use ure gaming platform."
+       }, "::", {
+               "name": "stop_game",
+               "synopsis": "Stop the game."
+       }],
        "class_name": "MMethodDef",
        "full_name": "test_prog$MyGame$Game::stop_game",
-       "mdoc": {
-               "content": "Stop the game.\n\nYou have to implement that method!",
-               "location": {
-                       "column_end": 0,
-                       "column_start": 2,
-                       "line_end": 44,
-                       "line_start": 41,
-                       "file": "test_location"
-               }
-       },
        "visibility": "public",
+       "html_synopsis": "<span class=\"synopsys nitdoc\">Stop the game.</span>",
        "modifiers": ["redef", "fun"],
-       "location": {
-               "column_end": 27,
-               "column_start": 2,
-               "line_end": 31,
-               "line_start": 31,
-               "file": "test_location"
-       },
-       "is_intro": false,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::Game::stop_game"
-       },
-       "intro": {
-               "full_name": "test_prog$Game$stop_game"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$Game"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
        "msignature": {
                "arity": 0,
-               "mparams": [],
-               "return_mtype": null,
-               "vararg_rank": -1
+               "mparameters": [],
+               "return_mtype": null
        }
 }
 {
        "name": "_player_characters",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "_player_characters"
+       }],
        "class_name": "MAttributeDef",
        "full_name": "test_prog$MyGame$_player_characters",
-       "mdoc": null,
        "visibility": "private",
        "modifiers": ["private", "var"],
-       "location": {
-               "column_end": 50,
-               "column_start": 2,
-               "line_end": 23,
-               "line_start": 23,
-               "file": "test_location"
-       },
-       "is_intro": true,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::game_examples::MyGame::_player_characters"
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$_player_characters"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
+       "is_intro": true,
        "static_mtype": {
-               "full_name": "test_prog::List[test_prog::Character]"
+               "name": "List[Character]",
+               "synopsis": "List of things.",
+               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
        }
 }
 {
        "name": "player_characters=",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "player_characters="
+       }],
        "class_name": "MMethodDef",
        "full_name": "test_prog$MyGame$player_characters=",
-       "mdoc": null,
        "visibility": "protected",
        "modifiers": ["protected", "fun"],
-       "location": {
-               "column_end": 50,
-               "column_start": 2,
-               "line_end": 23,
-               "line_start": 23,
-               "file": "test_location"
-       },
-       "is_intro": true,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::MyGame::player_characters="
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$player_characters="
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
+       "is_intro": true,
        "msignature": {
                "arity": 1,
-               "mparams": [{
+               "mparameters": [{
                        "is_vararg": false,
                        "name": "player_characters",
                        "mtype": {
-                               "full_name": "test_prog::List[test_prog::Character]"
+                               "name": "List[Character]",
+                               "synopsis": "List of things.",
+                               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
                        }
                }],
-               "return_mtype": null,
-               "vararg_rank": -1
+               "return_mtype": null
        }
 }
 {
        "name": "_computer_characters",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "_computer_characters"
+       }],
        "class_name": "MAttributeDef",
        "full_name": "test_prog$MyGame$_computer_characters",
-       "mdoc": null,
        "visibility": "private",
        "modifiers": ["private", "var"],
-       "location": {
-               "column_end": 52,
-               "column_start": 2,
-               "line_end": 25,
-               "line_start": 25,
-               "file": "test_location"
-       },
-       "is_intro": true,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::game_examples::MyGame::_computer_characters"
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$_computer_characters"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
+       "is_intro": true,
        "static_mtype": {
-               "full_name": "test_prog::List[test_prog::Character]"
+               "name": "List[Character]",
+               "synopsis": "List of things.",
+               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
        }
 }
 {
        "name": "computer_characters=",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "$", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "$", {
+               "name": "computer_characters="
+       }],
        "class_name": "MMethodDef",
        "full_name": "test_prog$MyGame$computer_characters=",
-       "mdoc": null,
        "visibility": "protected",
        "modifiers": ["protected", "fun"],
-       "location": {
-               "column_end": 52,
-               "column_start": 2,
-               "line_end": 25,
-               "line_start": 25,
-               "file": "test_location"
-       },
-       "is_intro": true,
-       "mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mproperty": {
-               "full_name": "test_prog::MyGame::computer_characters="
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$computer_characters="
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mmodule": {
-               "full_name": "test_prog::game_examples"
-       },
-       "mgroup": {
-               "full_name": "test_prog>examples>"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
+       "is_intro": true,
        "msignature": {
                "arity": 1,
-               "mparams": [{
+               "mparameters": [{
                        "is_vararg": false,
                        "name": "computer_characters",
                        "mtype": {
-                               "full_name": "test_prog::List[test_prog::Character]"
+                               "name": "List[Character]",
+                               "synopsis": "List of things.",
+                               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
                        }
                }],
-               "return_mtype": null,
-               "vararg_rank": -1
+               "return_mtype": null
        }
 }
 {
 }
 {
        "name": "_player_characters",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "::", {
+               "name": "game_examples"
+       }, "::", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "::", {
+               "name": "_player_characters"
+       }],
        "class_name": "MAttribute",
        "full_name": "test_prog::game_examples::MyGame::_player_characters",
-       "mdoc": null,
        "visibility": "private",
        "modifiers": ["private", "var"],
-       "location": {
-               "column_end": 50,
-               "column_start": 2,
-               "line_end": 23,
-               "line_start": 23,
-               "file": "test_location"
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$_player_characters"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mpropdefs": [{
-               "full_name": "test_prog$MyGame$_player_characters"
-       }],
-       "intro_mclass": {
-               "full_name": "test_prog::MyGame"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
        "static_mtype": {
-               "full_name": "test_prog::List[test_prog::Character]"
+               "name": "List[Character]",
+               "synopsis": "List of things.",
+               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
        }
 }
 {
        "name": "player_characters=",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "::", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "::", {
+               "name": "player_characters="
+       }],
        "class_name": "MMethod",
        "full_name": "test_prog::MyGame::player_characters=",
-       "mdoc": null,
        "visibility": "protected",
        "modifiers": ["protected", "fun"],
-       "location": {
-               "column_end": 50,
-               "column_start": 2,
-               "line_end": 23,
-               "line_start": 23,
-               "file": "test_location"
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$player_characters="
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mpropdefs": [{
-               "full_name": "test_prog$MyGame$player_characters="
-       }],
-       "intro_mclass": {
-               "full_name": "test_prog::MyGame"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
-       "is_init": false,
        "msignature": {
                "arity": 1,
-               "mparams": [{
+               "mparameters": [{
                        "is_vararg": false,
                        "name": "player_characters",
                        "mtype": {
-                               "full_name": "test_prog::List[test_prog::Character]"
+                               "name": "List[Character]",
+                               "synopsis": "List of things.",
+                               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
                        }
                }],
-               "return_mtype": null,
-               "vararg_rank": -1
+               "return_mtype": null
        }
 }
 {
        "name": "_computer_characters",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "::", {
+               "name": "game_examples"
+       }, "::", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "::", {
+               "name": "_computer_characters"
+       }],
        "class_name": "MAttribute",
        "full_name": "test_prog::game_examples::MyGame::_computer_characters",
-       "mdoc": null,
        "visibility": "private",
        "modifiers": ["private", "var"],
-       "location": {
-               "column_end": 52,
-               "column_start": 2,
-               "line_end": 25,
-               "line_start": 25,
-               "file": "test_location"
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$_computer_characters"
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mpropdefs": [{
-               "full_name": "test_prog$MyGame$_computer_characters"
-       }],
-       "intro_mclass": {
-               "full_name": "test_prog::MyGame"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
        "static_mtype": {
-               "full_name": "test_prog::List[test_prog::Character]"
+               "name": "List[Character]",
+               "synopsis": "List of things.",
+               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
        }
 }
 {
        "name": "computer_characters=",
+       "namespace": [{
+               "name": "test_prog",
+               "synopsis": "Test program for model tools."
+       }, "::", {
+               "name": "MyGame",
+               "synopsis": "This is an example of how to implement the Game interface"
+       }, "::", {
+               "name": "computer_characters="
+       }],
        "class_name": "MMethod",
        "full_name": "test_prog::MyGame::computer_characters=",
-       "mdoc": null,
        "visibility": "protected",
        "modifiers": ["protected", "fun"],
-       "location": {
-               "column_end": 52,
-               "column_start": 2,
-               "line_end": 25,
-               "line_start": 25,
-               "file": "test_location"
-       },
-       "intro": {
-               "full_name": "test_prog$MyGame$computer_characters="
-       },
-       "intro_mclassdef": {
-               "full_name": "test_prog$MyGame"
-       },
-       "mpropdefs": [{
-               "full_name": "test_prog$MyGame$computer_characters="
-       }],
-       "intro_mclass": {
-               "full_name": "test_prog::MyGame"
-       },
-       "mpackage": {
-               "full_name": "test_prog"
-       },
-       "is_init": false,
        "msignature": {
                "arity": 1,
-               "mparams": [{
+               "mparameters": [{
                        "is_vararg": false,
                        "name": "computer_characters",
                        "mtype": {
-                               "full_name": "test_prog::List[test_prog::Character]"
+                               "name": "List[Character]",
+                               "synopsis": "List of things.",
+                               "html_synopsis": "<span class=\"synopsys nitdoc\">List of things.</span>"
                        }
                }],
-               "return_mtype": null,
-               "vararg_rank": -1
+               "return_mtype": null
        }
 }
 {
@@ -3,7 +3,7 @@
        "synopsis": "Test program for model tools."
 }
 {
-       "name": "excluded"
+       "name": "game_examples"
 }
 {
        "name": "Object",