X-Git-Url: http://nitlanguage.org diff --git a/src/metrics/model_hyperdoc.nit b/src/metrics/model_hyperdoc.nit index fea58da..9e66e73 100644 --- a/src/metrics/model_hyperdoc.nit +++ b/src/metrics/model_hyperdoc.nit @@ -17,18 +17,15 @@ # Dump of Nit model into hypertext human-readable format. module model_hyperdoc -import model import metrics_base -import phase -import frontend redef class ToolContext - var model_hyperdoc_phase = new ModelHyperdocPhase(self, null) + var model_hyperdoc_phase: Phase = new ModelHyperdocPhase(self, null) end private class ModelHyperdocPhase super Phase - redef fun process_mainmodule(mainmodule) + redef fun process_mainmodule(mainmodule, given_mmodules) do if not toolcontext.opt_generate_hyperdoc.value and not toolcontext.opt_all.value then return generate_model_hyperdoc(toolcontext, toolcontext.modelbuilder.model) @@ -39,7 +36,7 @@ end # The generated file contains the description of each entity of the model fun generate_model_hyperdoc(toolcontext: ToolContext, model: Model) do - var buf = new Buffer + var buf = new FlatBuffer buf.append("\n\n") buf.append("

Model

\n") @@ -62,7 +59,7 @@ do buf.append("
project
\n") buf.append("
{linkto(mproject)}
\n") buf.append("
filepath
\n") - buf.append("
{mgroup.filepath}
\n") + buf.append("
{mgroup.filepath.to_s}
\n") var p = mgroup.parent if p != null then buf.append("
parent group
\n") @@ -189,7 +186,7 @@ do end end buf.append("\n") - var f = new OFStream.open(toolcontext.output_dir.join_path("model.html")) + var f = new FileWriter.open(toolcontext.output_dir.join_path("model.html")) f.write(buf.to_s) f.close end