nitls: reuse ProjTree::display for the simple list
authorJean Privat <jean@pryen.org>
Thu, 4 Dec 2014 04:07:27 +0000 (23:07 -0500)
committerJean Privat <jean@pryen.org>
Sat, 6 Dec 2014 03:50:28 +0000 (22:50 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

src/nitls.nit

index abdc4f1..fc6bd41 100644 (file)
@@ -116,8 +116,8 @@ end
 
 if sum == 0 then opt_project.value = true
 
+var ot = new ProjTree
 if opt_tree.value then
-       var ot = new ProjTree
        ot.opt_paths = opt_paths.value
        for p in model.mprojects do
                for g in p.mgroups do
@@ -139,7 +139,7 @@ if opt_source.value then
                                if opt_paths.value then
                                        list.add(mp.filepath)
                                else
-                                       list.add("{g.full_name}/{mp.name} ({mp.filepath})")
+                                       list.add("{g.full_name}/{ot.display(mp)}")
                                end
                        end
                end