19 |
19 |
20 class RenameDialog(RefactoringDialogBase, Ui_RenameDialog): |
20 class RenameDialog(RefactoringDialogBase, Ui_RenameDialog): |
21 """ |
21 """ |
22 Class implementing the Rename dialog. |
22 Class implementing the Rename dialog. |
23 """ |
23 """ |
24 def __init__(self, refactoring, title, renamer, resource=None, |
24 def __init__(self, refactoring, title, renamer, resource=None, |
25 parent=None): |
25 parent=None): |
26 """ |
26 """ |
27 Constructor |
27 Constructor |
28 |
28 |
29 @param refactoring reference to the main refactoring object |
29 @param refactoring reference to the main refactoring object |
116 @param handle reference to the task handle |
116 @param handle reference to the task handle |
117 (rope.base.taskhandle.TaskHandle) |
117 (rope.base.taskhandle.TaskHandle) |
118 @return reference to the Changes object (rope.base.change.ChangeSet) |
118 @return reference to the Changes object (rope.base.change.ChangeSet) |
119 """ |
119 """ |
120 try: |
120 try: |
121 changes = self.__renamer.get_changes(self.newNameEdit.text(), |
121 changes = self.__renamer.get_changes(self.newNameEdit.text(), |
122 resources=self.__resources, |
122 resources=self.__resources, |
123 in_hierarchy=self.allCheckBox.isChecked(), |
123 in_hierarchy=self.allCheckBox.isChecked(), |
124 unsure=self.__confirmUnsure, |
124 unsure=self.__confirmUnsure, |
125 docs=self.stringsCheckBox.isChecked(), |
125 docs=self.stringsCheckBox.isChecked(), |
126 task_handle=handle) |
126 task_handle=handle) |
127 return changes |
127 return changes |
128 except Exception as err: |
128 except Exception as err: |
129 self._refactoring.handleRopeError(err, self._title, handle) |
129 self._refactoring.handleRopeError(err, self._title, handle) |
130 return None |
130 return None |