RefactoringRope/Refactoring.py

branch
server_client_variant
changeset 176
117d86025a5c
parent 175
72a1d9030d67
child 178
70b4fb448811
diff -r 72a1d9030d67 -r 117d86025a5c RefactoringRope/Refactoring.py
--- a/RefactoringRope/Refactoring.py	Wed Sep 20 19:49:26 2017 +0200
+++ b/RefactoringRope/Refactoring.py	Thu Sep 21 19:18:51 2017 +0200
@@ -1050,7 +1050,6 @@
     ## Inline refactorings
     #####################################################
     
-    # TODO: continue from here
     def __inline(self):
         """
         Private slot to handle the Inline Local Variable action.
@@ -1076,24 +1075,19 @@
         line, index, line1, index1 = aw.getSelection()
         offset = self.__getOffset(aw, line, index)
         
-        import rope.refactor.inline
-        resource = rope.base.libutils.path_to_resource(
-            self.__project, filename)
-        try:
-            inliner = rope.refactor.inline.create_inline(
-                self.__project, resource, offset)
-        except Exception as err:
-            self.handleRopeError(err, title)
-            return
-        
         from InlineDialog import InlineDialog
-        self.dlg = InlineDialog(self, title, inliner, parent=self.__ui)
-        self.dlg.show()
+        dlg = InlineDialog(self, title, filename, offset, parent=self.__ui)
+        changeGroup = dlg.getChangeGroupName()
+        self.__refactoringDialogs[changeGroup] = dlg
+        dlg.finished.connect(
+            lambda: self.__refactoringDialogClosed(changeGroup))
+        dlg.show()
     
     #####################################################
     ## Move refactorings
     #####################################################
     
+    # TODO: continue from here
     def __moveMethod(self):
         """
         Private slot to handle the Move Method action.

eric ide

mercurial