--- a/RefactoringRope/Refactoring.py Sat Sep 23 12:01:48 2017 +0200 +++ b/RefactoringRope/Refactoring.py Sat Sep 23 12:16:59 2017 +0200 @@ -1170,7 +1170,6 @@ ## Introduce refactorings ##################################################### - # TODO: continue from here def __introduceFactoryMethod(self): """ Private slot to introduce a factory method or global function. @@ -1196,22 +1195,16 @@ line, index, line1, index1 = aw.getSelection() offset = self.__getOffset(aw, line, index) - import rope.refactor.introduce_factory - resource = rope.base.libutils.path_to_resource( - self.__project, filename) - try: - introducer = \ - rope.refactor.introduce_factory.IntroduceFactoryRefactoring( - self.__project, resource, offset) - except Exception as err: - self.handleRopeError(err, title) - return - from IntroduceFactoryDialog import IntroduceFactoryDialog - self.dlg = IntroduceFactoryDialog(self, title, introducer, + dlg = IntroduceFactoryDialog(self, title, filename, offset, parent=self.__ui) - self.dlg.show() + changeGroup = dlg.getChangeGroupName() + self.__refactoringDialogs[changeGroup] = dlg + dlg.finished.connect( + lambda: self.__refactoringDialogClosed(changeGroup)) + dlg.show() + # TODO: continue from here def __introduceParameter(self): """ Private slot to introduce a parameter in a function.