Commits

Anonymous committed 05a5114

environment: added Environment.ask_completion()

Comments (0)

Files changed (2)

ropemode/environment.py

 class Environment(object):
 
-    def ask_values(self, prompt, values, default=None,
-                   starting=None, exact=True):
-        pass
-
     def ask(self, prompt, default=None, starting=None):
         pass
 
+    def ask_values(self, prompt, values, default=None, starting=None):
+        pass
+
     def ask_directory(self, prompt, default=None, starting=None):
         pass
 
+    def ask_completion(self, prompt, values, starting=None):
+        pass
+
     def message(self, message):
         pass
 

ropemode/interface.py

         names = []
         for file in files:
             names.append('<'.join(reversed(file.path.split('/'))))
-        result = self.env.ask_values('Rope Find File: ', names, exact=True)
+        result = self.env.ask_values('Rope Find File: ', names)
         if result is not None:
             path = '/'.join(reversed(result.split('<')))
             file = self.project.get_file(path)
             self._starting = common_start
             self._offset = self.starting_offset + len(common_start)
         prompt = 'Completion for %s: ' % self.expression
-        result = self.env.ask_values(prompt, names,
-                                     starting=self.starting, exact=None)
+        result = self.env.ask_completion(prompt, names, self.starting)
         self._apply_assist(result)
 
     def lucky_assist(self, prefix):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.