X-Git-Url: http://nitlanguage.org diff --git a/src/ni_nitdoc.nit b/src/ni_nitdoc.nit index bb81f1a..fb6671f 100644 --- a/src/ni_nitdoc.nit +++ b/src/ni_nitdoc.nit @@ -17,6 +17,7 @@ module ni_nitdoc import model_utils +import modelize_property # The NitdocContext contains all the knowledge used for doc generation class NitdocContext @@ -45,8 +46,6 @@ class NitdocContext private var opt_custom_footer_text: OptionString = new OptionString("Text displayed as footer of all pages", "--custom-footer-text") init do - self.arguments = toolcontext.option_context.rest - toolcontext.option_context.options.clear toolcontext.option_context.add_option(opt_dir) toolcontext.option_context.add_option(opt_source) toolcontext.option_context.add_option(opt_sharedir) @@ -57,8 +56,10 @@ class NitdocContext toolcontext.option_context.add_option(opt_custom_overview_text) toolcontext.option_context.add_option(opt_custom_menu_items) toolcontext.process_options + self.arguments = toolcontext.option_context.rest if arguments.length < 1 then + print "usage: nitdoc [options] file..." toolcontext.option_context.usage exit(1) end @@ -66,8 +67,9 @@ class NitdocContext model = new Model mbuilder = new ModelBuilder(model, toolcontext) # Here we load an process all modules passed on the command line - var mmodules = mbuilder.parse_and_build(arguments) + var mmodules = mbuilder.parse(arguments) if mmodules.is_empty then return + mbuilder.run_phases if mmodules.length == 1 then mainmodule = mmodules.first @@ -1437,7 +1439,7 @@ redef class MPropDef if not page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then return var nprop = page.ctx.mbuilder.mpropdef2npropdef[self] page.append("
") - if not is_intro then + if not is_intro and page.ctx.mbuilder.mpropdef2npropdef.has_key(mproperty.intro) then var intro_nprop = page.ctx.mbuilder.mpropdef2npropdef[mproperty.intro] page.append("

from ") mproperty.html_namespace(page)