20 # Start-Of-Header |
20 # Start-Of-Header |
21 name = "Unused Code Checker Plug-in" |
21 name = "Unused Code Checker Plug-in" |
22 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
22 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
23 autoactivate = True |
23 autoactivate = True |
24 deactivateable = True |
24 deactivateable = True |
25 version = "3.1.1" |
25 version = "4.0.0" |
26 className = "VulturePlugin" |
26 className = "VulturePlugin" |
27 packageName = "VultureChecker" |
27 packageName = "VultureChecker" |
28 shortDescription = "Plug-in to detect unused code using the vulture library" |
28 shortDescription = "Plug-in to detect unused code using the vulture library" |
29 longDescription = ( |
29 longDescription = ( |
30 """Plug-in to detect unused code using the vulture library.""" |
30 """Plug-in to detect unused code using the vulture library.""" |
232 self.__projectShowMenu) |
232 self.__projectShowMenu) |
233 e5App().getObject("Project").projectClosed.disconnect( |
233 e5App().getObject("Project").projectClosed.disconnect( |
234 self.__projectClosed) |
234 self.__projectClosed) |
235 |
235 |
236 menu = e5App().getObject("Project").getMenu("Checks") |
236 menu = e5App().getObject("Project").getMenu("Checks") |
237 if menu: |
237 if menu is not None and self.__projectAct is not None: |
238 if self.__projectAct is not None: |
238 menu.removeAction(self.__projectAct) |
239 menu.removeAction(self.__projectAct) |
239 e5App().getObject("Project").removeE5Actions( |
240 e5App().getObject("Project").removeE5Actions( |
240 [self.__projectAct]) |
241 [self.__projectAct]) |
|
242 |
241 |
243 self.__initialize() |
242 self.__initialize() |
244 |
243 |
245 def __loadTranslator(self): |
244 def __loadTranslator(self): |
246 """ |
245 """ |
270 @param menuName name of the menu to be shown |
269 @param menuName name of the menu to be shown |
271 @type str |
270 @type str |
272 @param menu reference to the menu |
271 @param menu reference to the menu |
273 @type QMenu |
272 @type QMenu |
274 """ |
273 """ |
275 if menuName == "Check": |
274 if menuName == "Check" and self.__projectAct is not None: |
276 if self.__projectAct is not None: |
275 self.__projectAct.setEnabled( |
277 self.__projectAct.setEnabled( |
276 e5App().getObject("Project") |
278 e5App().getObject("Project") |
277 .getProjectLanguage() == "Python3" |
279 .getProjectLanguage() == "Python3" |
278 ) |
280 ) |
|
281 |
279 |
282 def __projectVultureCheck(self): |
280 def __projectVultureCheck(self): |
283 """ |
281 """ |
284 Private slot used to check the project for unused code. |
282 Private slot used to check the project for unused code. |
285 """ |
283 """ |