From: Alexandre Terrasa Date: Tue, 17 Feb 2015 18:45:48 +0000 (+0100) Subject: src/doc: move remaining services from `doc_model` to `doc_base` and delete the module X-Git-Tag: v0.7.2~5^2~4 X-Git-Url: http://nitlanguage.org src/doc: move remaining services from `doc_model` to `doc_base` and delete the module Signed-off-by: Alexandre Terrasa --- diff --git a/src/doc/doc_base.nit b/src/doc/doc_base.nit index 615f98c..e947ee2 100644 --- a/src/doc/doc_base.nit +++ b/src/doc/doc_base.nit @@ -16,7 +16,8 @@ module doc_base import toolcontext -import doc_model # FIXME maintain compatibility with old templates. +import model_utils +import model_ext # The model of a Nitdoc documentation. # @@ -219,3 +220,16 @@ class PropertyGroup[E: MProperty] # The title of the group, as displayed to the user. var title: String end + +redef class MEntity + # Name displayed in console for debug and tests. + fun nitdoc_name: String do return name.html_escape +end + +redef class MClassDef + redef fun nitdoc_name do return mclass.nitdoc_name +end + +redef class MPropDef + redef fun nitdoc_name do return mproperty.nitdoc_name +end diff --git a/src/doc/doc_model.nit b/src/doc/doc_model.nit deleted file mode 100644 index ff45042..0000000 --- a/src/doc/doc_model.nit +++ /dev/null @@ -1,35 +0,0 @@ -# This file is part of NIT ( http://www.nitlanguage.org ). -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Nitdoc model template parts generation -module doc_model - -import model_utils -import doc_down -import doc_templates -import ordered_tree -import model_ext - -redef class MEntity - # HTML-escaped name. - fun nitdoc_name: String do return name.html_escape -end - -redef class MClassDef - redef fun nitdoc_name do return mclass.nitdoc_name -end - -redef class MPropDef - redef fun nitdoc_name do return mproperty.nitdoc_name -end