From 982781ade3e9b38c4c59cb4eed8da612f9054306 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Wed, 3 Dec 2014 22:03:07 -0500 Subject: [PATCH] nitls: shows the synopsys of modules and groups by default Signed-off-by: Jean Privat --- src/nitls.nit | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/nitls.nit b/src/nitls.nit index fc6bd41..0dd3cfd 100644 --- a/src/nitls.nit +++ b/src/nitls.nit @@ -32,11 +32,21 @@ class ProjTree if opt_paths then return o.filepath.as(not null) else - return "{o.name} ({o.filepath.to_s})" + var d = "" + if o.mdoc != null then + d = ": {o.mdoc.content.first}" + end + return "{o.name} ({o.filepath.to_s}){d}" end else if o isa ModulePath then if opt_paths then return o.filepath + else if o.mmodule != null then + var d = "" + if o.mmodule.mdoc != null then + d = ": {o.mmodule.mdoc.content.first}" + end + return "{o.name}{d} ({o.filepath})" else return "{o.name} ({o.filepath})" end @@ -108,8 +118,9 @@ else for a in files do var mp = mb.identify_file(a) - if mp == null then - tc.check_errors + tc.check_errors + if mp != null and not opt_paths.value then + mb.load_module(mp.filepath) end end end -- 1.7.9.5