Anonymous avatar Anonymous committed 76fdc10

rope-find-occurrences: added in_hierarchy argument

Comments (0)

Files changed (1)

ropemacs/interface.py

         optionals = {
             'unsure': ropemacs.dialog.Data('Find uncertain occurrences: ',
                                            default='no', values=['yes', 'no']),
-            'resources': ropemacs.dialog.Data('Files to search: ')}
+            'resources': ropemacs.dialog.Data('Files to search: '),
+            'in_hierarchy': ropemacs.dialog.Data(
+                    'Rename methods in class hierarchy: ',
+                    default='no', values=['yes', 'no'])}
         action, values = ropemacs.dialog.show_dialog(
             lisputils.askdata, ['search', 'cancel'], optionals=optionals)
         if action == 'search':
             unsure = values.get('unsure') == 'yes'
+            hier = values.get('in_hierarchy') == 'yes'
             resources = ropemacs.refactor._resources(self.project,
                                                      values.get('resources'))
             def calculate(handle):
                 return codeassist.find_occurrences(
-                    self.project, resource, offset,
-                    unsure=unsure, resources=resources, task_handle=handle)
+                    self.project, resource, offset, unsure=unsure,
+                    resources=resources, in_hierarchy=hier, task_handle=handle)
             result = lisputils.runtask(calculate, 'Find Occurrences')
             text = []
             for occurrence in result:
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.