13 import rope.refactor.change_signature |
13 import rope.refactor.change_signature |
14 |
14 |
15 from Ui_InlineArgumentDefaultDialog import Ui_InlineArgumentDefaultDialog |
15 from Ui_InlineArgumentDefaultDialog import Ui_InlineArgumentDefaultDialog |
16 from RefactoringDialogBase import RefactoringDialogBase |
16 from RefactoringDialogBase import RefactoringDialogBase |
17 |
17 |
18 class InlineArgumentDefaultDialog(RefactoringDialogBase, |
18 |
|
19 class InlineArgumentDefaultDialog(RefactoringDialogBase, |
19 Ui_InlineArgumentDefaultDialog): |
20 Ui_InlineArgumentDefaultDialog): |
20 """ |
21 """ |
21 Class implementing the Inline Argument Default dialog. |
22 Class implementing the Inline Argument Default dialog. |
22 """ |
23 """ |
23 NameRole = Qt.UserRole |
24 NameRole = Qt.UserRole |
27 Constructor |
28 Constructor |
28 |
29 |
29 @param refactoring reference to the main refactoring object |
30 @param refactoring reference to the main refactoring object |
30 (Refactoring) |
31 (Refactoring) |
31 @param title title of the dialog (string) |
32 @param title title of the dialog (string) |
32 @param changer reference to the signature changer object |
33 @param changer reference to the signature changer object |
33 (rope.refactor.change_signature.ChangeSignature) |
34 (rope.refactor.change_signature.ChangeSignature) |
34 @param parent reference to the parent widget (QWidget) |
35 @param parent reference to the parent widget (QWidget) |
35 """ |
36 """ |
36 RefactoringDialogBase.__init__(self, refactoring, title, parent) |
37 RefactoringDialogBase.__init__(self, refactoring, title, parent) |
37 self.setupUi(self) |
38 self.setupUi(self) |
102 index = self.__getParameterIndex(self.__definition_info, name) |
103 index = self.__getParameterIndex(self.__definition_info, name) |
103 try: |
104 try: |
104 inliner = \ |
105 inliner = \ |
105 rope.refactor.change_signature.ArgumentDefaultInliner( |
106 rope.refactor.change_signature.ArgumentDefaultInliner( |
106 index) |
107 index) |
107 changes = self.__signature.get_changes([inliner], |
108 changes = self.__signature.get_changes([inliner], |
108 task_handle=handle) |
109 task_handle=handle) |
109 return changes |
110 return changes |
110 except Exception as err: |
111 except Exception as err: |
111 self._refactoring.handleRopeError(err, self._title, handle) |
112 self._refactoring.handleRopeError(err, self._title, handle) |
112 return None |
113 return None |