Moved NitIndex redefintion from Debugger to Nitx
[nit.git] / src / debugger.nit
index b71edd5..ae1ac5a 100644 (file)
@@ -19,30 +19,7 @@ module debugger
 
 import breakpoint
 intrude import naive_interpreter
-intrude import nitx
-
-redef class NitIndex
-
-       # New constructor to use the pre-calculated model when interpreting a module
-       init with_infos(model: Model, mbuilder: ModelBuilder, mmodule: MModule, toolctx: ToolContext) do
-
-               self.model = model
-               self.mbuilder = mbuilder
-
-               self.mainmodule = mmodule
-               self.toolcontext = toolctx
-               self.arguments = toolctx.option_context.rest
-
-               renderer = new PagerMatchesRenderer(self)
-       end
-
-       redef fun search(s)
-       do
-               if s == ":q" then return
-               super
-       end
-
-end
+import nitx
 
 redef class ToolContext
        # -d
@@ -298,7 +275,7 @@ class Debugger
                        return step_over
                # Opens a new NitIndex prompt on current model
                else if command == "nitx" then
-                       new NitIndex.with_infos(modelbuilder.model, modelbuilder, self.mainmodule, self.modelbuilder.toolcontext).prompt
+                       new NitIndex.with_infos(modelbuilder, self.mainmodule).prompt
                        return true
                # Continues execution until the end
                else if command == "c" then