14 from E4Gui.E4Application import e4App |
14 from E4Gui.E4Application import e4App |
15 |
15 |
16 from E4Gui.E4Action import E4Action |
16 from E4Gui.E4Action import E4Action |
17 |
17 |
18 from CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog import SyntaxCheckerDialog |
18 from CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog import SyntaxCheckerDialog |
|
19 |
|
20 import Preferences |
19 |
21 |
20 # Start-Of-Header |
22 # Start-Of-Header |
21 name = "Syntax Checker Plugin" |
23 name = "Syntax Checker Plugin" |
22 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
23 autoactivate = True |
25 autoactivate = True |
176 """ |
178 """ |
177 Public slot used to check the project files for bad indentations. |
179 Public slot used to check the project files for bad indentations. |
178 """ |
180 """ |
179 project = e4App().getObject("Project") |
181 project = e4App().getObject("Project") |
180 project.saveAllScripts() |
182 project.saveAllScripts() |
181 # TODO: make this dependant on configured extensions |
|
182 files = [os.path.join(project.ppath, file) \ |
183 files = [os.path.join(project.ppath, file) \ |
183 for file in project.pdata["SOURCES"] \ |
184 for file in project.pdata["SOURCES"] \ |
184 if file.endswith(".py") or \ |
185 if file.endswith(tuple(Preferences.getPython("Python3Extensions")))] |
185 file.endswith(".pyw") or \ |
|
186 file.endswith(".ptl")] |
|
187 |
186 |
188 self.__projectSyntaxCheckerDialog = SyntaxCheckerDialog() |
187 self.__projectSyntaxCheckerDialog = SyntaxCheckerDialog() |
189 self.__projectSyntaxCheckerDialog.show() |
188 self.__projectSyntaxCheckerDialog.show() |
190 self.__projectSyntaxCheckerDialog.start(files) |
189 self.__projectSyntaxCheckerDialog.start(files) |
191 |
190 |