Merge: introduce nit_env.sh to setup the shell environement
[nit.git] / src / nitx.nit
index 7d7e872..1c8be5f 100644 (file)
@@ -20,6 +20,7 @@
 # * Display documentation page from Nitdoc in console
 # * Find type usage in parameters, returns and news.
 # * Find usage of a specific property.
+# * Find source code related to class/property by its name.
 module nitx
 
 import modelbuilder
@@ -31,9 +32,9 @@ redef class ToolContext
        var docx: Phase = new NitxPhase(self, null)
 
        # Used to shortcut the prompt and display directly the result in console.
-       var opt_query = new OptionString("Nitx query to perform", "-q", "--query")
+       var opt_command = new OptionString("Nitx command to perform", "-c", "--command")
 
-       init do option_context.add_option opt_query
+       init do option_context.add_option opt_command
 end
 
 # Nitx phase explores the model and prepares the console rendering.
@@ -47,7 +48,8 @@ private class NitxPhase
                        new ExtractionPhase(toolcontext, doc),
                        new MakePagePhase(toolcontext, doc),
                        new ConcernsPhase(toolcontext, doc),
-                       new StructurePhase(toolcontext, doc): DocPhase]
+                       new StructurePhase(toolcontext, doc),
+                       new POSetPhase(toolcontext, doc): DocPhase]
 
                for phase in phases do
                        toolcontext.info("# {phase.class_name}", 1)
@@ -56,7 +58,7 @@ private class NitxPhase
 
                # start nitx
                var nitx = new Nitx(toolcontext, doc)
-               var q = toolcontext.opt_query.value
+               var q = toolcontext.opt_command.value
                if q != null then # shortcut prompt
                        print ""
                        nitx.do_query(q)