module ni_nitdoc
import model_utils
+import modelize_property
# The NitdocContext contains all the knowledge used for doc generation
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)
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
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
if not page.ctx.mbuilder.mpropdef2npropdef.has_key(self) then return
var nprop = page.ctx.mbuilder.mpropdef2npropdef[self]
page.append("<div class='description'>")
- 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("<p>from ")
mproperty.html_namespace(page)