RefactoringRope/Refactoring.py

changeset 19
32dd7dbf3e8e
parent 16
65b340b40844
child 20
83b71483e198
equal deleted inserted replaced
18:92ed128e0d6e 19:32dd7dbf3e8e
35 from PyQt4.QtCore import QObject, SIGNAL 35 from PyQt4.QtCore import QObject, SIGNAL
36 from PyQt4.QtGui import QMenu, QApplication, QMessageBox, QDialog 36 from PyQt4.QtGui import QMenu, QApplication, QMessageBox, QDialog
37 37
38 from E5Gui.E5Application import e5App 38 from E5Gui.E5Application import e5App
39 39
40 from E5Gui import E5MessageBox
41 from E5Gui.E5Action import E5Action 40 from E5Gui.E5Action import E5Action
42 41
43 from QScintilla.MiniEditor import MiniEditor 42 from QScintilla.MiniEditor import MiniEditor
44 43
45 from FileSystemCommands import e5FileSystemCommands 44 from FileSystemCommands import e5FileSystemCommands
824 823
825 def __ropeInfo(self): 824 def __ropeInfo(self):
826 """ 825 """
827 Private slot to show some info about rope. 826 Private slot to show some info about rope.
828 """ 827 """
829 E5MessageBox.about(self.__ui, 828 QMessageBox.about(self.__ui,
830 self.trUtf8("About rope"), 829 self.trUtf8("About rope"),
831 self.trUtf8("{0}\nVersion {1}\n\n{2}".format( 830 self.trUtf8("{0}\nVersion {1}\n\n{2}".format(
832 rope.INFO, rope.VERSION, rope.COPYRIGHT))) 831 rope.INFO, rope.VERSION, rope.COPYRIGHT)))
833 832
834 def __canUndo(self): 833 def __canUndo(self):
932 """ 931 """
933 if handle is not None: 932 if handle is not None:
934 handle.reset() 933 handle.reset()
935 if str(type(err)).split()[-1][1:-2].split('.')[-1] == \ 934 if str(type(err)).split()[-1][1:-2].split('.')[-1] == \
936 'ModuleSyntaxError': 935 'ModuleSyntaxError':
937 res = E5MessageBox.warning(self.__ui, title, 936 res = QMessageBox.warning(self.__ui, title,
938 self.trUtf8("Rope error: {0}").format(str(err)), 937 self.trUtf8("Rope error: {0}").format(str(err)),
939 QMessageBox.Ok | QMessageBox.Open) 938 QMessageBox.Ok | QMessageBox.Open)
940 if res == QMessageBox.Open: 939 if res == QMessageBox.Open:
941 e5App().getObject("ViewManager").openSourceFile( 940 e5App().getObject("ViewManager").openSourceFile(
942 os.path.join(self.__e4project.getProjectPath(), 941 os.path.join(self.__e4project.getProjectPath(),
943 err.filename), 942 err.filename),
944 err.lineno) 943 err.lineno)
945 else: 944 else:
946 E5MessageBox.warning(self.__ui, title, 945 QMessageBox.warning(self.__ui, title,
947 self.trUtf8("Rope error: {0}").format(str(err))) 946 self.trUtf8("Rope error: {0}").format(str(err)))
948 947
949 ################################################################## 948 ##################################################################
950 ## slots below implement the various refactorings 949 ## slots below implement the various refactorings
951 ################################################################## 950 ##################################################################
988 if aw is None: 987 if aw is None:
989 return 988 return
990 989
991 if not renameModule and not aw.hasSelectedText(): 990 if not renameModule and not aw.hasSelectedText():
992 # no selection available 991 # no selection available
993 E5MessageBox.warning(self.__ui, title, 992 QMessageBox.warning(self.__ui, title,
994 self.trUtf8("Highlight the declaration you want to rename" 993 self.trUtf8("Highlight the declaration you want to rename"
995 " and try again.")) 994 " and try again."))
996 return 995 return
997 996
998 if isLocal: 997 if isLocal:
1007 offset = None 1006 offset = None
1008 else: 1007 else:
1009 line, index, line1, index1 = aw.getSelection() 1008 line, index, line1, index1 = aw.getSelection()
1010 if line != line1: 1009 if line != line1:
1011 # selection span more than one line 1010 # selection span more than one line
1012 E5MessageBox.warning(self.__ui, title, 1011 QMessageBox.warning(self.__ui, title,
1013 self.trUtf8("The selection must not extend beyond" 1012 self.trUtf8("The selection must not extend beyond"
1014 " one line.")) 1013 " one line."))
1015 return 1014 return
1016 index = int(index + (index1 - index) / 2) 1015 index = int(index + (index1 - index) / 2)
1017 # keep it inside the object 1016 # keep it inside the object
1044 return 1043 return
1045 1044
1046 title = self.trUtf8("Change Occurrences") 1045 title = self.trUtf8("Change Occurrences")
1047 if not aw.hasSelectedText(): 1046 if not aw.hasSelectedText():
1048 # no selection available 1047 # no selection available
1049 E5MessageBox.warning(self.__ui, title, 1048 QMessageBox.warning(self.__ui, title,
1050 self.trUtf8("Highlight an occurrence to be changed" 1049 self.trUtf8("Highlight an occurrence to be changed"
1051 " and try again.")) 1050 " and try again."))
1052 return 1051 return
1053 1052
1054 if not self.confirmBufferIsSaved(aw): 1053 if not self.confirmBufferIsSaved(aw):
1100 if aw is None: 1099 if aw is None:
1101 return 1100 return
1102 1101
1103 if not aw.hasSelectedText(): 1102 if not aw.hasSelectedText():
1104 # no selection available 1103 # no selection available
1105 E5MessageBox.warning(self.__ui, title, 1104 QMessageBox.warning(self.__ui, title,
1106 self.trUtf8("Highlight the region of code you want to extract" 1105 self.trUtf8("Highlight the region of code you want to extract"
1107 " and try again.")) 1106 " and try again."))
1108 return 1107 return
1109 1108
1110 if not self.confirmBufferIsSaved(aw): 1109 if not self.confirmBufferIsSaved(aw):
1147 return 1146 return
1148 1147
1149 title = self.trUtf8("Inline") 1148 title = self.trUtf8("Inline")
1150 if not aw.hasSelectedText(): 1149 if not aw.hasSelectedText():
1151 # no selection available 1150 # no selection available
1152 E5MessageBox.warning(self.__ui, title, 1151 QMessageBox.warning(self.__ui, title,
1153 self.trUtf8("Highlight the local variable, method or parameter" 1152 self.trUtf8("Highlight the local variable, method or parameter"
1154 " you want to inline and try again.")) 1153 " you want to inline and try again."))
1155 return 1154 return
1156 1155
1157 if not self.confirmAllBuffersSaved(): 1156 if not self.confirmAllBuffersSaved():
1187 return 1186 return
1188 1187
1189 title = self.trUtf8("Move Method") 1188 title = self.trUtf8("Move Method")
1190 if not aw.hasSelectedText(): 1189 if not aw.hasSelectedText():
1191 # no selection available 1190 # no selection available
1192 E5MessageBox.warning(self.__ui, title, 1191 QMessageBox.warning(self.__ui, title,
1193 self.trUtf8("Highlight the method to move" 1192 self.trUtf8("Highlight the method to move"
1194 " and try again.")) 1193 " and try again."))
1195 return 1194 return
1196 1195
1197 if not self.confirmAllBuffersSaved(): 1196 if not self.confirmAllBuffersSaved():
1256 return 1255 return
1257 1256
1258 title = self.trUtf8("Use Function") 1257 title = self.trUtf8("Use Function")
1259 if not aw.hasSelectedText(): 1258 if not aw.hasSelectedText():
1260 # no selection available 1259 # no selection available
1261 E5MessageBox.warning(self.__ui, title, 1260 QMessageBox.warning(self.__ui, title,
1262 self.trUtf8("Highlight a global function and try again.")) 1261 self.trUtf8("Highlight a global function and try again."))
1263 return 1262 return
1264 1263
1265 if not self.confirmAllBuffersSaved(): 1264 if not self.confirmAllBuffersSaved():
1266 return 1265 return
1295 return 1294 return
1296 1295
1297 title = self.trUtf8("Introduce Factory Method") 1296 title = self.trUtf8("Introduce Factory Method")
1298 if not aw.hasSelectedText(): 1297 if not aw.hasSelectedText():
1299 # no selection available 1298 # no selection available
1300 E5MessageBox.warning(self.__ui, title, 1299 QMessageBox.warning(self.__ui, title,
1301 self.trUtf8("Highlight the class to introduce a factory" 1300 self.trUtf8("Highlight the class to introduce a factory"
1302 " method for and try again.")) 1301 " method for and try again."))
1303 return 1302 return
1304 1303
1305 if not self.confirmAllBuffersSaved(): 1304 if not self.confirmAllBuffersSaved():
1333 return 1332 return
1334 1333
1335 title = self.trUtf8("Introduce Parameter") 1334 title = self.trUtf8("Introduce Parameter")
1336 if not aw.hasSelectedText(): 1335 if not aw.hasSelectedText():
1337 # no selection available 1336 # no selection available
1338 E5MessageBox.warning(self.__ui, title, 1337 QMessageBox.warning(self.__ui, title,
1339 self.trUtf8("Highlight the code for the new parameter" 1338 self.trUtf8("Highlight the code for the new parameter"
1340 " and try again.")) 1339 " and try again."))
1341 return 1340 return
1342 1341
1343 if not self.confirmAllBuffersSaved(): 1342 if not self.confirmAllBuffersSaved():
1429 self.__project.do(changes) 1428 self.__project.do(changes)
1430 self.refreshEditors(changes) 1429 self.refreshEditors(changes)
1431 if self.__e5project.isDirty(): 1430 if self.__e5project.isDirty():
1432 self.__e5project.saveProject() 1431 self.__e5project.saveProject()
1433 else: 1432 else:
1434 E5MessageBox.information(self.__ui, title, 1433 QMessageBox.information(self.__ui, title,
1435 self.trUtf8("The selected refactoring did not produce" 1434 self.trUtf8("The selected refactoring did not produce"
1436 " any change.")) 1435 " any change."))
1437 except Exception as err: 1436 except Exception as err:
1438 self.handleRopeError(err, title) 1437 self.handleRopeError(err, title)
1439 1438
1459 return 1458 return
1460 1459
1461 title = self.trUtf8("Change Method Signature") 1460 title = self.trUtf8("Change Method Signature")
1462 if not aw.hasSelectedText(): 1461 if not aw.hasSelectedText():
1463 # no selection available 1462 # no selection available
1464 E5MessageBox.warning(self.__ui, title, 1463 QMessageBox.warning(self.__ui, title,
1465 self.trUtf8("Highlight the method or function to change" 1464 self.trUtf8("Highlight the method or function to change"
1466 " and try again.")) 1465 " and try again."))
1467 return 1466 return
1468 1467
1469 if not self.confirmAllBuffersSaved(): 1468 if not self.confirmAllBuffersSaved():
1497 return 1496 return
1498 1497
1499 title = self.trUtf8("Inline Argument Default") 1498 title = self.trUtf8("Inline Argument Default")
1500 if not aw.hasSelectedText(): 1499 if not aw.hasSelectedText():
1501 # no selection available 1500 # no selection available
1502 E5MessageBox.warning(self.__ui, title, 1501 QMessageBox.warning(self.__ui, title,
1503 self.trUtf8("Highlight the method or function to inline" 1502 self.trUtf8("Highlight the method or function to inline"
1504 " a parameter's default and try again.")) 1503 " a parameter's default and try again."))
1505 return 1504 return
1506 1505
1507 if not self.confirmAllBuffersSaved(): 1506 if not self.confirmAllBuffersSaved():
1562 return 1561 return
1563 1562
1564 title = self.trUtf8("Encapsulate Attribute") 1563 title = self.trUtf8("Encapsulate Attribute")
1565 if not aw.hasSelectedText(): 1564 if not aw.hasSelectedText():
1566 # no selection available 1565 # no selection available
1567 E5MessageBox.warning(self.__ui, title, 1566 QMessageBox.warning(self.__ui, title,
1568 self.trUtf8("Highlight the attribute to encapsulate" 1567 self.trUtf8("Highlight the attribute to encapsulate"
1569 " and try again.")) 1568 " and try again."))
1570 return 1569 return
1571 1570
1572 if not self.confirmAllBuffersSaved(): 1571 if not self.confirmAllBuffersSaved():
1616 return 1615 return
1617 1616
1618 title = self.trUtf8("Local Variable to Attribute") 1617 title = self.trUtf8("Local Variable to Attribute")
1619 if not aw.hasSelectedText(): 1618 if not aw.hasSelectedText():
1620 # no selection available 1619 # no selection available
1621 E5MessageBox.warning(self.__ui, title, 1620 QMessageBox.warning(self.__ui, title,
1622 self.trUtf8("Highlight the local variable to make an attribute" 1621 self.trUtf8("Highlight the local variable to make an attribute"
1623 " and try again.")) 1622 " and try again."))
1624 return 1623 return
1625 1624
1626 if not self.confirmAllBuffersSaved(): 1625 if not self.confirmAllBuffersSaved():
1654 return 1653 return
1655 1654
1656 title = self.trUtf8("Replace Method With Method Object") 1655 title = self.trUtf8("Replace Method With Method Object")
1657 if not aw.hasSelectedText(): 1656 if not aw.hasSelectedText():
1658 # no selection available 1657 # no selection available
1659 E5MessageBox.warning(self.__ui, title, 1658 QMessageBox.warning(self.__ui, title,
1660 self.trUtf8("Highlight the method or function to convert" 1659 self.trUtf8("Highlight the method or function to convert"
1661 " and try again.")) 1660 " and try again."))
1662 return 1661 return
1663 1662
1664 if not self.confirmAllBuffersSaved(): 1663 if not self.confirmAllBuffersSaved():
1689 """ 1688 """
1690 Private slot to undo the last refactoring. 1689 Private slot to undo the last refactoring.
1691 """ 1690 """
1692 title = self.trUtf8("Undo refactoring") 1691 title = self.trUtf8("Undo refactoring")
1693 history = self.__project.history 1692 history = self.__project.history
1694 res = E5MessageBox.question(None, 1693 res = QMessageBox.question(None,
1695 title, 1694 title,
1696 self.trUtf8("""Shall the refactoring <b>{0}</b> be undone?""")\ 1695 self.trUtf8("""Shall the refactoring <b>{0}</b> be undone?""")\
1697 .format(Utilities.html_encode( 1696 .format(Utilities.html_encode(
1698 history.undo_list[-1].description)), 1697 history.undo_list[-1].description)),
1699 QMessageBox.StandardButtons( 1698 QMessageBox.StandardButtons(
1721 """ 1720 """
1722 Private slot to redo the last refactoring. 1721 Private slot to redo the last refactoring.
1723 """ 1722 """
1724 title = self.trUtf8("Redo refactoring") 1723 title = self.trUtf8("Redo refactoring")
1725 history = self.__project.history 1724 history = self.__project.history
1726 res = E5MessageBox.question(None, 1725 res = QMessageBox.question(None,
1727 title, 1726 title,
1728 self.trUtf8("""Shall the refactoring <b>{0}</b> be redone?""")\ 1727 self.trUtf8("""Shall the refactoring <b>{0}</b> be redone?""")\
1729 .format(Utilities.html_encode( 1728 .format(Utilities.html_encode(
1730 history.redo_list[-1].description)), 1729 history.redo_list[-1].description)),
1731 QMessageBox.StandardButtons(\ 1730 QMessageBox.StandardButtons(\
1801 1800
1802 def __clearHistory(self): 1801 def __clearHistory(self):
1803 """ 1802 """
1804 Private slot to clear the redo and undo lists. 1803 Private slot to clear the redo and undo lists.
1805 """ 1804 """
1806 res = E5MessageBox.question(None, 1805 res = QMessageBox.question(None,
1807 self.trUtf8("Clear History"), 1806 self.trUtf8("Clear History"),
1808 self.trUtf8("""Do you really want to clear the undo""" 1807 self.trUtf8("""Do you really want to clear the undo"""
1809 """ and redo history?"""), 1808 """ and redo history?"""),
1810 QMessageBox.StandardButtons(\ 1809 QMessageBox.StandardButtons(\
1811 QMessageBox.No | \ 1810 QMessageBox.No | \
1828 return 1827 return
1829 1828
1830 title = self.trUtf8("Find Occurrences") 1829 title = self.trUtf8("Find Occurrences")
1831 if not aw.hasSelectedText(): 1830 if not aw.hasSelectedText():
1832 # no selection available 1831 # no selection available
1833 E5MessageBox.warning(self.__ui, title, 1832 QMessageBox.warning(self.__ui, title,
1834 self.trUtf8("Highlight the class, method, function or variable" 1833 self.trUtf8("Highlight the class, method, function or variable"
1835 " to search for and try again.")) 1834 " to search for and try again."))
1836 return 1835 return
1837 1836
1838 if not self.confirmAllBuffersSaved(): 1837 if not self.confirmAllBuffersSaved():
1861 self.dlg.show() 1860 self.dlg.show()
1862 for occurrence in occurrences: 1861 for occurrence in occurrences:
1863 self.dlg.addEntry(occurrence.resource, 1862 self.dlg.addEntry(occurrence.resource,
1864 occurrence.lineno, occurrence.unsure) 1863 occurrence.lineno, occurrence.unsure)
1865 else: 1864 else:
1866 E5MessageBox.warning(self.__ui, title, 1865 QMessageBox.warning(self.__ui, title,
1867 self.trUtf8("No occurrences found.")) 1866 self.trUtf8("No occurrences found."))
1868 1867
1869 def __queryDefinition(self): 1868 def __queryDefinition(self):
1870 """ 1869 """
1871 Private slot to handle the Find Definition action 1870 Private slot to handle the Find Definition action
1876 return 1875 return
1877 1876
1878 title = self.trUtf8("Find &Definition") 1877 title = self.trUtf8("Find &Definition")
1879 if not aw.hasSelectedText(): 1878 if not aw.hasSelectedText():
1880 # no selection available 1879 # no selection available
1881 E5MessageBox.warning(self.__ui, title, 1880 QMessageBox.warning(self.__ui, title,
1882 self.trUtf8("Highlight the class, method, function or" 1881 self.trUtf8("Highlight the class, method, function or"
1883 " variable reference to search definition for and" 1882 " variable reference to search definition for and"
1884 " try again.")) 1883 " try again."))
1885 return 1884 return
1886 1885
1903 if location is not None: 1902 if location is not None:
1904 self.dlg = MatchesDialog(self.__ui, False) 1903 self.dlg = MatchesDialog(self.__ui, False)
1905 self.dlg.show() 1904 self.dlg.show()
1906 self.dlg.addEntry(location.resource, location.lineno) 1905 self.dlg.addEntry(location.resource, location.lineno)
1907 else: 1906 else:
1908 E5MessageBox.warning(self.__ui, title, 1907 QMessageBox.warning(self.__ui, title,
1909 self.trUtf8("No matching definition found.")) 1908 self.trUtf8("No matching definition found."))
1910 1909
1911 def __queryImplementations(self): 1910 def __queryImplementations(self):
1912 """ 1911 """
1913 Private slot to handle the Find Implementations action. 1912 Private slot to handle the Find Implementations action.
1918 return 1917 return
1919 1918
1920 title = self.trUtf8("Find Implementations") 1919 title = self.trUtf8("Find Implementations")
1921 if not aw.hasSelectedText(): 1920 if not aw.hasSelectedText():
1922 # no selection available 1921 # no selection available
1923 E5MessageBox.warning(self.__ui, title, 1922 QMessageBox.warning(self.__ui, title,
1924 self.trUtf8("Highlight the method to search for" 1923 self.trUtf8("Highlight the method to search for"
1925 " and try again.")) 1924 " and try again."))
1926 return 1925 return
1927 1926
1928 if not self.confirmAllBuffersSaved(): 1927 if not self.confirmAllBuffersSaved():
1950 self.dlg.show() 1949 self.dlg.show()
1951 for occurrence in occurrences: 1950 for occurrence in occurrences:
1952 self.dlg.addEntry(occurrence.resource, 1951 self.dlg.addEntry(occurrence.resource,
1953 occurrence.lineno, occurrence.unsure) 1952 occurrence.lineno, occurrence.unsure)
1954 else: 1953 else:
1955 E5MessageBox.warning(self.__ui, title, 1954 QMessageBox.warning(self.__ui, title,
1956 self.trUtf8("No occurrences found.")) 1955 self.trUtf8("No occurrences found."))
1957 1956
1958 ##################################################### 1957 #####################################################
1959 ## Various actions 1958 ## Various actions
1960 ##################################################### 1959 #####################################################
1974 self.__editor.editorSaved.connect(self.__configChanged) 1973 self.__editor.editorSaved.connect(self.__configChanged)
1975 else: 1974 else:
1976 self.connect(self.__editor, SIGNAL("editorSaved"), 1975 self.connect(self.__editor, SIGNAL("editorSaved"),
1977 self.__configChanged) 1976 self.__configChanged)
1978 else: 1977 else:
1979 E5MessageBox.critical(self.__ui, 1978 QMessageBox.critical(self.__ui,
1980 self.trUtf8("Configure Rope"), 1979 self.trUtf8("Configure Rope"),
1981 self.trUtf8("""The Rope configuration file '{0}' does""" 1980 self.trUtf8("""The Rope configuration file '{0}' does"""
1982 """ not exist.""").format(configfile)) 1981 """ not exist.""").format(configfile))
1983 else: 1982 else:
1984 E5MessageBox.critical(self.__ui, 1983 QMessageBox.critical(self.__ui,
1985 self.trUtf8("Configure Rope"), 1984 self.trUtf8("Configure Rope"),
1986 self.trUtf8("""The Rope admin directory does not exist.""")) 1985 self.trUtf8("""The Rope admin directory does not exist."""))
1987 1986
1988 def __updateConfig(self): 1987 def __updateConfig(self):
1989 """ 1988 """
1990 Private slot to update the configuration file. 1989 Private slot to update the configuration file.
1991 """ 1990 """
1992 res = E5MessageBox.yesNo(self.__ui, 1991 res = QMessageBox.question(self.__ui,
1993 self.trUtf8("Update Configuration"), 1992 self.trUtf8("Update Configuration"),
1994 self.trUtf8("""Shall rope's current configuration be replaced """ 1993 self.trUtf8("""Shall rope's current configuration be replaced """
1995 """by a new default configuration?""")) 1994 """by a new default configuration?"""),
1996 if res: 1995 QMessageBox.StandardButtons(\
1996 QMessageBox.No | \
1997 QMessageBox.Yes),
1998 QMessageBox.No)
1999 if res == QMessageBox.Yes:
1997 src = self.__defaultConfig() 2000 src = self.__defaultConfig()
1998 cname = self.__ropeConfigFile() 2001 cname = self.__ropeConfigFile()
1999 if src != "" and cname is not None: 2002 if src != "" and cname is not None:
2000 try: 2003 try:
2001 f = open(cname, "w") 2004 f = open(cname, "w")
2002 f.write(src) 2005 f.write(src)
2003 f.close() 2006 f.close()
2004 self.__configChanged() 2007 self.__configChanged()
2005 self.__editConfig() 2008 self.__editConfig()
2006 except IOError as err: 2009 except IOError as err:
2007 E5MessageBox.critical(None, 2010 QMessageBox.critical(None,
2008 self.trUtf8("Update Configuration"), 2011 self.trUtf8("Update Configuration"),
2009 self.trUtf8("""<p>The configuration could not be""" 2012 self.trUtf8("""<p>The configuration could not be"""
2010 """ updated.</p><p>Reason: {0}</p>""")\ 2013 """ updated.</p><p>Reason: {0}</p>""")\
2011 .format(str(err))) 2014 .format(str(err)))
2012 2015
2025 def __performSOA(self): 2028 def __performSOA(self):
2026 """ 2029 """
2027 Private slot to perform SOA on all modules. 2030 Private slot to perform SOA on all modules.
2028 """ 2031 """
2029 title = self.trUtf8("Analyse all modules") 2032 title = self.trUtf8("Analyse all modules")
2030 res = E5MessageBox.yesNo(self.__ui, 2033 res = QMessageBox.question(self.__ui,
2031 title, 2034 title,
2032 self.trUtf8("""This action might take some time. """ 2035 self.trUtf8("""This action might take some time. """
2033 """Do you really want to perform SOA?""")) 2036 """Do you really want to perform SOA?"""),
2034 if res: 2037 QMessageBox.StandardButtons(\
2038 QMessageBox.No | \
2039 QMessageBox.Yes),
2040 QMessageBox.No)
2041 if res == QMessageBox.Yes:
2035 handle = ProgressHandle(title, True, self.__ui) 2042 handle = ProgressHandle(title, True, self.__ui)
2036 handle.show() 2043 handle.show()
2037 QApplication.processEvents() 2044 QApplication.processEvents()
2038 try: 2045 try:
2039 rope.base.libutils.analyze_modules(self.__project, 2046 rope.base.libutils.analyze_modules(self.__project,
2040 task_handle=handle) 2047 task_handle=handle)
2041 handle.reset() 2048 handle.reset()
2042 E5MessageBox.information(self.__ui, 2049 QMessageBox.information(self.__ui,
2043 title, 2050 title,
2044 self.trUtf8("""Static object analysis (SOA) done. """ 2051 self.trUtf8("""Static object analysis (SOA) done. """
2045 """SOA database updated.""")) 2052 """SOA database updated."""))
2046 except Exception as err: 2053 except Exception as err:
2047 self.handleRopeError(err, title, handle) 2054 self.handleRopeError(err, title, handle)

eric ide

mercurial