RefactoringRope/Refactoring.py

branch
server_client_variant
changeset 184
4a806271f0b9
parent 183
bac69c80d5f4
child 185
3336637a673b
equal deleted inserted replaced
183:bac69c80d5f4 184:4a806271f0b9
1334 self.__refactoringDialogs[changeGroup] = dlg 1334 self.__refactoringDialogs[changeGroup] = dlg
1335 dlg.finished.connect( 1335 dlg.finished.connect(
1336 lambda: self.__refactoringDialogClosed(changeGroup)) 1336 lambda: self.__refactoringDialogClosed(changeGroup))
1337 dlg.show() 1337 dlg.show()
1338 1338
1339 # TODO: continue from here
1340 def __changeSignature(self): 1339 def __changeSignature(self):
1341 """ 1340 """
1342 Private slot to change the signature of a method or function. 1341 Private slot to change the signature of a method or function.
1343 """ 1342 """
1344 aw = e5App().getObject("ViewManager").activeWindow() 1343 aw = e5App().getObject("ViewManager").activeWindow()
1360 1359
1361 filename = aw.getFileName() 1360 filename = aw.getFileName()
1362 line, index, line1, index1 = aw.getSelection() 1361 line, index, line1, index1 = aw.getSelection()
1363 offset = self.__getOffset(aw, line, index) 1362 offset = self.__getOffset(aw, line, index)
1364 1363
1365 import rope.refactor.change_signature
1366 resource = rope.base.libutils.path_to_resource(
1367 self.__project, filename)
1368 try:
1369 changer = rope.refactor.change_signature.ChangeSignature(
1370 self.__project, resource, offset)
1371 except Exception as err:
1372 self.handleRopeError(err, title)
1373 return
1374
1375 from ChangeSignatureDialog import ChangeSignatureDialog 1364 from ChangeSignatureDialog import ChangeSignatureDialog
1376 self.dlg = ChangeSignatureDialog(self, title, changer, 1365 dlg = ChangeSignatureDialog(self, title, filename, offset,
1377 parent=self.__ui) 1366 parent=self.__ui)
1378 self.dlg.show() 1367 changeGroup = dlg.getChangeGroupName()
1379 1368 self.__refactoringDialogs[changeGroup] = dlg
1369 dlg.finished.connect(
1370 lambda: self.__refactoringDialogClosed(changeGroup))
1371 dlg.show()
1372
1373 # TODO: continue from here
1380 def __inlineArgumentDefault(self): 1374 def __inlineArgumentDefault(self):
1381 """ 1375 """
1382 Private slot to inline the default value of a parameter of a 1376 Private slot to inline the default value of a parameter of a
1383 method or function. 1377 method or function.
1384 """ 1378 """

eric ide

mercurial