Plugins/PluginSyntaxChecker.py

changeset 3034
7ce719013078
parent 3022
57179e4cdadd
child 3036
30c81c9e88b8
equal deleted inserted replaced
3033:58fe260e7469 3034:7ce719013078
146 @param menuName name of the menu to be shown (string) 146 @param menuName name of the menu to be shown (string)
147 @param menu reference to the menu (QMenu) 147 @param menu reference to the menu (QMenu)
148 """ 148 """
149 if menuName == "Checks" and self.__projectAct is not None: 149 if menuName == "Checks" and self.__projectAct is not None:
150 self.__projectAct.setEnabled( 150 self.__projectAct.setEnabled(
151 e5App().getObject("Project").getProjectLanguage() in \ 151 e5App().getObject("Project").getProjectLanguage() in
152 ["Python3", "Python2", "Python"]) 152 ["Python3", "Python2", "Python"])
153 153
154 def __projectBrowserShowMenu(self, menuName, menu): 154 def __projectBrowserShowMenu(self, menuName, menu):
155 """ 155 """
156 Private slot called, when the the project browser menu or a submenu is 156 Private slot called, when the the project browser menu or a submenu is
182 Public slot used to check the project files for syntax errors. 182 Public slot used to check the project files for syntax errors.
183 """ 183 """
184 project = e5App().getObject("Project") 184 project = e5App().getObject("Project")
185 project.saveAllScripts() 185 project.saveAllScripts()
186 ppath = project.getProjectPath() 186 ppath = project.getProjectPath()
187 files = [os.path.join(ppath, file) \ 187 files = [os.path.join(ppath, file)
188 for file in project.pdata["SOURCES"] \ 188 for file in project.pdata["SOURCES"]
189 if file.endswith( 189 if file.endswith(
190 tuple(Preferences.getPython("Python3Extensions")) + 190 tuple(Preferences.getPython("Python3Extensions")) +
191 tuple(Preferences.getPython("PythonExtensions")))] 191 tuple(Preferences.getPython("PythonExtensions")))]
192 192
193 from CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog import \ 193 from CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog import \

eric ide

mercurial