10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import os |
12 import os |
13 import sys |
13 import sys |
14 |
14 |
15 from PyQt4.QtCore import QObject, QTranslator |
15 from PyQt5.QtCore import QObject, QTranslator |
16 |
16 |
17 from E5Gui.E5Application import e5App |
17 from E5Gui.E5Application import e5App |
18 |
18 |
19 from Preferences.Shortcuts import readShortcuts |
19 from Preferences.Shortcuts import readShortcuts |
20 |
20 |
21 # Start-Of-Header |
21 # Start-Of-Header |
22 name = "Refactoring Rope Plugin" |
22 name = "Refactoring Rope Plugin" |
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 autoactivate = True |
24 autoactivate = True |
25 deactivateable = True |
25 deactivateable = True |
26 version = "2.4.1" |
26 version = "3.0.0" |
27 className = "RefactoringRopePlugin" |
27 className = "RefactoringRopePlugin" |
28 packageName = "RefactoringRope" |
28 packageName = "RefactoringRope" |
29 internalPackages = "rope" |
29 internalPackages = "rope" |
30 shortDescription = "Refactoring using the Rope library." |
30 shortDescription = "Refactoring using the Rope library." |
31 longDescription = """This plugin implements refactoring functionality""" \ |
31 longDescription = """This plugin implements refactoring functionality""" \ |
72 |
72 |
73 @return flag indicating a suitable version (boolean) |
73 @return flag indicating a suitable version (boolean) |
74 """ |
74 """ |
75 global error |
75 global error |
76 |
76 |
77 suitable = self.__ui.versionIsNewer("5.0.99", "20100811") |
77 suitable = self.__ui.versionIsNewer("5.99.99", "20140701") |
78 if not suitable: |
78 if not suitable: |
79 error = self.trUtf8("Your version of eric5 is not supported.") |
79 error = self.tr("Your version of eric6 is not supported.") |
80 return suitable |
80 return suitable |
81 |
81 |
82 def activate(self): |
82 def activate(self): |
83 """ |
83 """ |
84 Public method to activate this plugin. |
84 Public method to activate this plugin. |
182 " be loaded.".format(translation)) |
182 " be loaded.".format(translation)) |
183 print("Using default.") |
183 print("Using default.") |
184 |
184 |
185 def __projectOpened(self): |
185 def __projectOpened(self): |
186 """ |
186 """ |
187 Public slot to handle the projectOpened signal. |
187 Private slot to handle the projectOpened signal. |
188 """ |
188 """ |
189 if sys.version_info[0] == 3: |
189 if sys.version_info[0] == 3: |
190 lang = ["Python3"] |
190 lang = ["Python3"] |
191 elif sys.version_info[0] == 2: |
191 elif sys.version_info[0] == 2: |
192 lang = ["Python", "Python2"] |
192 lang = ["Python", "Python2"] |
197 self.__mainAct.setEnabled(enabled) |
197 self.__mainAct.setEnabled(enabled) |
198 self.__projectIsOpen = enabled |
198 self.__projectIsOpen = enabled |
199 |
199 |
200 def __projectClosed(self): |
200 def __projectClosed(self): |
201 """ |
201 """ |
202 Public slot to handle the projectClosed signal. |
202 Private slot to handle the projectClosed signal. |
203 """ |
203 """ |
204 self.__mainAct.setEnabled(False) |
204 self.__mainAct.setEnabled(False) |
205 self.__projectIsOpen = False |
205 self.__projectIsOpen = False |