26 version = "6.10.0" |
26 version = "6.10.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 plug-in implements refactoring functionality""" \ |
31 longDescription = ( |
32 """ using the Rope refactoring library. Additionally it implements an""" \ |
32 """This plug-in implements refactoring functionality""" |
33 """ alternative auto-completion and call-tips provider. It is a""" \ |
33 """ using the Rope refactoring library. Additionally it implements an""" |
|
34 """ alternative auto-completion and call-tips provider. It is a""" |
34 """ provider for code documentation as well.""" |
35 """ provider for code documentation as well.""" |
|
36 ) |
35 pyqtApi = 2 |
37 pyqtApi = 2 |
36 doNotCompile = True |
38 doNotCompile = True |
37 python2Compatible = True |
39 python2Compatible = True |
38 # End-Of-Header |
40 # End-Of-Header |
39 |
41 |
48 |
50 |
49 @param configDlg reference to the configuration dialog |
51 @param configDlg reference to the configuration dialog |
50 @return reference to the configuration page |
52 @return reference to the configuration page |
51 """ |
53 """ |
52 global refactoringRopePluginObject |
54 global refactoringRopePluginObject |
53 from RefactoringRope.ConfigurationPage.AutoCompletionRopePage \ |
55 from RefactoringRope.ConfigurationPage.AutoCompletionRopePage import ( |
54 import AutoCompletionRopePage |
56 AutoCompletionRopePage |
|
57 ) |
55 page = AutoCompletionRopePage(refactoringRopePluginObject) |
58 page = AutoCompletionRopePage(refactoringRopePluginObject) |
56 return page |
59 return page |
57 |
60 |
58 |
61 |
59 def createCallTipsPage(configDlg): |
62 def createCallTipsPage(configDlg): |
62 |
65 |
63 @param configDlg reference to the configuration dialog |
66 @param configDlg reference to the configuration dialog |
64 @return reference to the configuration page |
67 @return reference to the configuration page |
65 """ |
68 """ |
66 global refactoringRopePluginObject |
69 global refactoringRopePluginObject |
67 from RefactoringRope.ConfigurationPage.CallTipsRopePage \ |
70 from RefactoringRope.ConfigurationPage.CallTipsRopePage import ( |
68 import CallTipsRopePage |
71 CallTipsRopePage |
|
72 ) |
69 page = CallTipsRopePage(refactoringRopePluginObject) |
73 page = CallTipsRopePage(refactoringRopePluginObject) |
70 return page |
74 return page |
71 |
75 |
72 |
76 |
73 def createMouseClickHandlerPage(configDlg): |
77 def createMouseClickHandlerPage(configDlg): |
76 |
80 |
77 @param configDlg reference to the configuration dialog |
81 @param configDlg reference to the configuration dialog |
78 @return reference to the configuration page |
82 @return reference to the configuration page |
79 """ |
83 """ |
80 global refactoringRopePluginObject |
84 global refactoringRopePluginObject |
81 from RefactoringRope.ConfigurationPage.MouseClickHandlerRopePage \ |
85 from RefactoringRope.ConfigurationPage.MouseClickHandlerRopePage import ( |
82 import MouseClickHandlerRopePage |
86 MouseClickHandlerRopePage |
83 page = MouseClickHandlerRopePage(refactoringRopePluginObject) |
87 ) |
|
88 page = MouseClickHandlerRopePage( |
|
89 refactoringRopePluginObject) |
84 return page |
90 return page |
85 |
91 |
86 |
92 |
87 def getConfigData(): |
93 def getConfigData(): |
88 """ |
94 """ |
231 Private method to load the translation file. |
237 Private method to load the translation file. |
232 """ |
238 """ |
233 if self.__ui is not None: |
239 if self.__ui is not None: |
234 loc = self.__ui.getLocale() |
240 loc = self.__ui.getLocale() |
235 if loc and loc != "C": |
241 if loc and loc != "C": |
236 locale_dir = \ |
242 locale_dir = os.path.join(os.path.dirname(__file__), |
237 os.path.join(os.path.dirname(__file__), |
243 "RefactoringRope", "i18n") |
238 "RefactoringRope", "i18n") |
|
239 translation = "rope_{0}".format(loc) |
244 translation = "rope_{0}".format(loc) |
240 translator = QTranslator(None) |
245 translator = QTranslator(None) |
241 loaded = translator.load(translation, locale_dir) |
246 loaded = translator.load(translation, locale_dir) |
242 if loaded: |
247 if loaded: |
243 self.__translator = translator |
248 self.__translator = translator |