eric6/Plugins/PluginCodeStyleChecker.py

changeset 8222
5994b80b8760
parent 8218
7c09585bd960
child 8240
93b8a353c4bf
equal deleted inserted replaced
8221:0572a215bd2f 8222:5994b80b8760
290 290
291 menu = e5App().getObject("Project").getMenu("Checks") 291 menu = e5App().getObject("Project").getMenu("Checks")
292 if menu: 292 if menu:
293 menu.removeAction(self.__projectAct) 293 menu.removeAction(self.__projectAct)
294 294
295 if self.__projectBrowserMenu: 295 if self.__projectBrowserMenu and self.__projectBrowserAct:
296 if self.__projectBrowserAct: 296 self.__projectBrowserMenu.removeAction(
297 self.__projectBrowserMenu.removeAction( 297 self.__projectBrowserAct)
298 self.__projectBrowserAct)
299 298
300 for editor in self.__editors: 299 for editor in self.__editors:
301 editor.showMenu.disconnect(self.__editorShowMenu) 300 editor.showMenu.disconnect(self.__editorShowMenu)
302 menu = editor.getMenu("Checks") 301 menu = editor.getMenu("Checks")
303 if menu is not None: 302 if menu is not None:
441 """ 440 """
442 Private slot to handle the code style check context menu action 441 Private slot to handle the code style check context menu action
443 of the editors. 442 of the editors.
444 """ 443 """
445 editor = e5App().getObject("ViewManager").activeWindow() 444 editor = e5App().getObject("ViewManager").activeWindow()
446 if editor is not None: 445 if (
447 if editor.checkDirty() and editor.getFileName() is not None: 446 editor is not None and
448 from CheckerPlugins.CodeStyleChecker import ( 447 editor.checkDirty() and
449 CodeStyleCheckerDialog 448 editor.getFileName() is not None
450 ) 449 ):
451 self.__editorCodeStyleCheckerDialog = ( 450 from CheckerPlugins.CodeStyleChecker import (
452 CodeStyleCheckerDialog.CodeStyleCheckerDialog(self) 451 CodeStyleCheckerDialog
453 ) 452 )
454 self.__editorCodeStyleCheckerDialog.show() 453 self.__editorCodeStyleCheckerDialog = (
455 self.__editorCodeStyleCheckerDialog.start( 454 CodeStyleCheckerDialog.CodeStyleCheckerDialog(self)
456 editor.getFileName(), 455 )
457 save=True, 456 self.__editorCodeStyleCheckerDialog.show()
458 repeat=True) 457 self.__editorCodeStyleCheckerDialog.start(
458 editor.getFileName(),
459 save=True,
460 repeat=True)

eric ide

mercurial