Merge: doc: fixed some typos and other misc. corrections
[nit.git] / src / uml / uml_class.nit
index c6d4870..5dfdfd1 100644 (file)
@@ -35,7 +35,7 @@ redef class UMLModel
                                        fontname = "Bitstream Vera Sans"
                                        fontsize = 8
                                ]\n"""
-               for mclass in view.mclasses do
+               for mclass in model.collect_mclasses(filter) do
                        tpl.add mclass.tpl_class(self)
                        tpl.add "\n"
                end
@@ -52,6 +52,7 @@ end
 redef class MClass
 
        redef fun tpl_class(model) do
+               var name = name.escape_to_dot
                var t = new Template
                t.add "{name} [\n label = \"\{"
                if kind == abstract_kind then
@@ -71,7 +72,7 @@ redef class MClass
                        t.add "]"
                end
                t.add "|"
-               var props = collect_intro_mproperties(model.view)
+               var props = collect_intro_mproperties(model.filter)
                for i in props do
                        if not i isa MAttribute then continue
                        t.add i.tpl_class(model)
@@ -86,7 +87,7 @@ redef class MClass
                t.add "\}\"\n]\n"
                var g = in_hierarchy(model.mainmodule).direct_greaters
                for i in g do
-                       if not model.view.accept_mentity(i) then continue
+                       if not model.filter.accept_mentity(i) then continue
                        t.add "{i.name} -> {name} [dir=back"
                        if i.kind == interface_kind then
                                t.add " arrowtail=open style=dashed"
@@ -121,12 +122,12 @@ redef class MSignature
                        params.add i
                end
                if params.length > 0 then
-                       t.add params.first.name
+                       t.add params.first.name.escape_to_dot
                        t.add ": "
                        t.add params.first.mtype.tpl_class(model)
                        for i in [1 .. params.length [ do
                                t.add ", "
-                               t.add params[i].name
+                               t.add params[i].name.escape_to_dot
                                t.add ": "
                                t.add params[i].mtype.tpl_class(model)
                        end
@@ -145,7 +146,7 @@ redef class MAttribute
                var tpl = new Template
                tpl.add visibility.tpl_class
                tpl.add " "
-               tpl.add name
+               tpl.add name.escape_to_dot
                tpl.add ": "
                tpl.add intro.static_mtype.tpl_class(model)
                return tpl