75 @return tuple of None and activation status (boolean) |
75 @return tuple of None and activation status (boolean) |
76 """ |
76 """ |
77 menu = e5App().getObject("Project").getMenu("Checks") |
77 menu = e5App().getObject("Project").getMenu("Checks") |
78 if menu: |
78 if menu: |
79 self.__projectAct = E5Action( |
79 self.__projectAct = E5Action( |
80 self.trUtf8('Check Code Style'), |
80 self.tr('Check Code Style'), |
81 self.trUtf8('&Code Style...'), 0, 0, |
81 self.tr('&Code Style...'), 0, 0, |
82 self, 'project_check_pep8') |
82 self, 'project_check_pep8') |
83 self.__projectAct.setStatusTip( |
83 self.__projectAct.setStatusTip( |
84 self.trUtf8('Check code style.')) |
84 self.tr('Check code style.')) |
85 self.__projectAct.setWhatsThis(self.trUtf8( |
85 self.__projectAct.setWhatsThis(self.tr( |
86 """<b>Check Code Style...</b>""" |
86 """<b>Check Code Style...</b>""" |
87 """<p>This checks Python files for compliance to the""" |
87 """<p>This checks Python files for compliance to the""" |
88 """ code style conventions given in various PEPs.</p>""" |
88 """ code style conventions given in various PEPs.</p>""" |
89 )) |
89 )) |
90 self.__projectAct.triggered[()].connect( |
90 self.__projectAct.triggered[()].connect( |
91 self.__projectCodeStyleCheck) |
91 self.__projectCodeStyleCheck) |
92 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
92 e5App().getObject("Project").addE5Actions([self.__projectAct]) |
93 menu.addAction(self.__projectAct) |
93 menu.addAction(self.__projectAct) |
94 |
94 |
95 self.__editorAct = E5Action( |
95 self.__editorAct = E5Action( |
96 self.trUtf8('Check Code Style'), |
96 self.tr('Check Code Style'), |
97 self.trUtf8('&Code Style...'), 0, 0, |
97 self.tr('&Code Style...'), 0, 0, |
98 self, "") |
98 self, "") |
99 self.__editorAct.setWhatsThis(self.trUtf8( |
99 self.__editorAct.setWhatsThis(self.tr( |
100 """<b>Check Code Style...</b>""" |
100 """<b>Check Code Style...</b>""" |
101 """<p>This checks Python files for compliance to the""" |
101 """<p>This checks Python files for compliance to the""" |
102 """ code style conventions given in various PEPs.</p>""" |
102 """ code style conventions given in various PEPs.</p>""" |
103 )) |
103 )) |
104 self.__editorAct.triggered[()].connect(self.__editorCodeStyleCheck) |
104 self.__editorAct.triggered[()].connect(self.__editorCodeStyleCheck) |
171 e5App().getObject("Project").getProjectLanguage() in \ |
171 e5App().getObject("Project").getProjectLanguage() in \ |
172 ["Python3", "Python2", "Python"]: |
172 ["Python3", "Python2", "Python"]: |
173 self.__projectBrowserMenu = menu |
173 self.__projectBrowserMenu = menu |
174 if self.__projectBrowserAct is None: |
174 if self.__projectBrowserAct is None: |
175 self.__projectBrowserAct = E5Action( |
175 self.__projectBrowserAct = E5Action( |
176 self.trUtf8('Check Code Style'), |
176 self.tr('Check Code Style'), |
177 self.trUtf8('&Code Style...'), 0, 0, |
177 self.tr('&Code Style...'), 0, 0, |
178 self, "") |
178 self, "") |
179 self.__projectBrowserAct.setWhatsThis(self.trUtf8( |
179 self.__projectBrowserAct.setWhatsThis(self.tr( |
180 """<b>Check Code Style...</b>""" |
180 """<b>Check Code Style...</b>""" |
181 """<p>This checks Python files for compliance to the""" |
181 """<p>This checks Python files for compliance to the""" |
182 """ code style conventions given in various PEPs.</p>""" |
182 """ code style conventions given in various PEPs.</p>""" |
183 )) |
183 )) |
184 self.__projectBrowserAct.triggered[()].connect( |
184 self.__projectBrowserAct.triggered[()].connect( |