Sun, 18 May 2014 14:13:09 +0200
Corrected a bunch of source docu issues.
3456 | 1 | <!DOCTYPE html> |
2 | <html><head> | |
3 | <title>eric5.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckService</title> | |
4 | <meta charset="UTF-8"> | |
5 | <style> | |
6 | body { | |
7 | background: #EDECE6; | |
8 | margin: 0em 1em 10em 1em; | |
9 | color: black; | |
10 | } | |
11 | ||
12 | h1 { color: white; background: #85774A; } | |
13 | h2 { color: white; background: #85774A; } | |
14 | h3 { color: white; background: #9D936E; } | |
15 | h4 { color: white; background: #9D936E; } | |
16 | ||
17 | a { color: #BA6D36; } | |
18 | ||
19 | </style> | |
20 | </head> | |
21 | <body><a NAME="top" ID="top"></a> | |
22 | <h1>eric5.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckService</h1> | |
23 | <p> | |
24 | Module implementing an interface to add different languages to do a syntax | |
25 | check. | |
26 | </p> | |
27 | <h3>Global Attributes</h3> | |
28 | <table> | |
29 | <tr><td>None</td></tr> | |
30 | </table> | |
31 | <h3>Classes</h3> | |
32 | <table> | |
33 | <tr> | |
34 | <td><a href="#SyntaxCheckService">SyntaxCheckService</a></td> | |
35 | <td>Implement the syntax check service.</td> | |
36 | </tr> | |
37 | </table> | |
38 | <h3>Functions</h3> | |
39 | <table> | |
40 | <tr><td>None</td></tr> | |
41 | </table> | |
42 | <hr /><hr /> | |
43 | <a NAME="SyntaxCheckService" ID="SyntaxCheckService"></a> | |
44 | <h2>SyntaxCheckService</h2> | |
45 | <p> | |
46 | Implement the syntax check service. | |
47 | </p><p> | |
48 | Plugins can add other languages to the syntax check by calling addLanguage | |
49 | and support of an extra checker module on the client side which has to | |
50 | connect directly to the background service. | |
51 | </p><h3>Signals</h3> | |
52 | <dl> | |
53 | <dt>syntaxChecked(str, dict)</dt> | |
54 | <dd> | |
55 | emited when the syntax check was done. | |
56 | </dd> | |
57 | </dl> | |
58 | <h3>Derived from</h3> | |
59 | QObject | |
60 | <h3>Class Attributes</h3> | |
61 | <table> | |
62 | <tr><td>None</td></tr> | |
63 | </table> | |
64 | <h3>Class Methods</h3> | |
65 | <table> | |
66 | <tr><td>None</td></tr> | |
67 | </table> | |
68 | <h3>Methods</h3> | |
69 | <table> | |
70 | <tr> | |
71 | <td><a href="#SyntaxCheckService.__init__">SyntaxCheckService</a></td> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
72 | <td>Constructor</td> |
3456 | 73 | </tr><tr> |
74 | <td><a href="#SyntaxCheckService.__determineLanguage">__determineLanguage</a></td> | |
75 | <td>Private methode to determine the language of the file.</td> | |
76 | </tr><tr> | |
77 | <td><a href="#SyntaxCheckService.addLanguage">addLanguage</a></td> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
78 | <td>Public method to register a new language to the supported languages.</td> |
3456 | 79 | </tr><tr> |
80 | <td><a href="#SyntaxCheckService.getExtensions">getExtensions</a></td> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
81 | <td>Public method to return all supported file extensions for the syntax checker dialog.</td> |
3456 | 82 | </tr><tr> |
83 | <td><a href="#SyntaxCheckService.getLanguages">getLanguages</a></td> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
84 | <td>Public method to return the supported language names.</td> |
3456 | 85 | </tr><tr> |
86 | <td><a href="#SyntaxCheckService.removeLanguage">removeLanguage</a></td> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
87 | <td>Public method to remove the language from syntax check.</td> |
3456 | 88 | </tr><tr> |
89 | <td><a href="#SyntaxCheckService.syntaxCheck">syntaxCheck</a></td> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
90 | <td>Public method to prepare to compile one Python source file to Python bytecode and to perform a pyflakes check.</td> |
3456 | 91 | </tr> |
92 | </table> | |
93 | <h3>Static Methods</h3> | |
94 | <table> | |
95 | <tr><td>None</td></tr> | |
96 | </table> | |
97 | <a NAME="SyntaxCheckService.__init__" ID="SyntaxCheckService.__init__"></a> | |
98 | <h4>SyntaxCheckService (Constructor)</h4> | |
99 | <b>SyntaxCheckService</b>(<i></i>) | |
100 | <p> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
101 | Constructor |
3456 | 102 | </p><a NAME="SyntaxCheckService.__determineLanguage" ID="SyntaxCheckService.__determineLanguage"></a> |
103 | <h4>SyntaxCheckService.__determineLanguage</h4> | |
104 | <b>__determineLanguage</b>(<i>filename, source</i>) | |
105 | <p> | |
106 | Private methode to determine the language of the file. | |
107 | </p><dl> | |
108 | <dt><i>filename</i></dt> | |
109 | <dd> | |
110 | of the sourcefile (str) | |
111 | </dd><dt><i>source</i></dt> | |
112 | <dd> | |
113 | code of the file (str) | |
114 | </dd> | |
115 | </dl><dl> | |
116 | <dt>Returns:</dt> | |
117 | <dd> | |
118 | language of the file or None if not found (str or None) | |
119 | </dd> | |
120 | </dl><a NAME="SyntaxCheckService.addLanguage" ID="SyntaxCheckService.addLanguage"></a> | |
121 | <h4>SyntaxCheckService.addLanguage</h4> | |
3525
66f4b8646622
Reintegrated the js syntax checker and therefore improved the background service a little.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
3456
diff
changeset
|
122 | <b>addLanguage</b>(<i>lang, env, path, module, getArgs, getExt, callback, onError</i>) |
3456 | 123 | <p> |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
124 | Public method to register a new language to the supported languages. |
3456 | 125 | </p><dl> |
126 | <dt><i>lang</i></dt> | |
127 | <dd> | |
128 | new language to check syntax (str) | |
3525
66f4b8646622
Reintegrated the js syntax checker and therefore improved the background service a little.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
3456
diff
changeset
|
129 | </dd><dt><i>env</i></dt> |
66f4b8646622
Reintegrated the js syntax checker and therefore improved the background service a little.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
3456
diff
changeset
|
130 | <dd> |
66f4b8646622
Reintegrated the js syntax checker and therefore improved the background service a little.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents:
3456
diff
changeset
|
131 | the environment in which the checker is implemented (str) |
3456 | 132 | </dd><dt><i>path</i></dt> |
133 | <dd> | |
134 | full path to the module (str) | |
135 | </dd><dt><i>module</i></dt> | |
136 | <dd> | |
137 | name to import (str) | |
138 | </dd><dt><i>getArgs</i></dt> | |
139 | <dd> | |
140 | function to collect the required arguments to call the | |
141 | syntax checker on client side (function) | |
142 | </dd><dt><i>getExt</i></dt> | |
143 | <dd> | |
144 | function that returns the supported file extensions of | |
145 | the syntax checker (function) | |
146 | </dd><dt><i>callback</i></dt> | |
147 | <dd> | |
148 | function on service response (function) | |
149 | </dd><dt><i>onError</i></dt> | |
150 | <dd> | |
151 | callback function if client or service isn't available | |
152 | (function) | |
153 | </dd> | |
154 | </dl><a NAME="SyntaxCheckService.getExtensions" ID="SyntaxCheckService.getExtensions"></a> | |
155 | <h4>SyntaxCheckService.getExtensions</h4> | |
156 | <b>getExtensions</b>(<i></i>) | |
157 | <p> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
158 | Public method to return all supported file extensions for the |
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
159 | syntax checker dialog. |
3456 | 160 | </p><dl> |
161 | <dt>Returns:</dt> | |
162 | <dd> | |
163 | set of all supported file extensions (set of str) | |
164 | </dd> | |
165 | </dl><a NAME="SyntaxCheckService.getLanguages" ID="SyntaxCheckService.getLanguages"></a> | |
166 | <h4>SyntaxCheckService.getLanguages</h4> | |
167 | <b>getLanguages</b>(<i></i>) | |
168 | <p> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
169 | Public method to return the supported language names. |
3456 | 170 | </p><dl> |
171 | <dt>Returns:</dt> | |
172 | <dd> | |
173 | list of languanges supported (list of str) | |
174 | </dd> | |
175 | </dl><a NAME="SyntaxCheckService.removeLanguage" ID="SyntaxCheckService.removeLanguage"></a> | |
176 | <h4>SyntaxCheckService.removeLanguage</h4> | |
177 | <b>removeLanguage</b>(<i>lang</i>) | |
178 | <p> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
179 | Public method to remove the language from syntax check. |
3456 | 180 | </p><dl> |
181 | <dt><i>lang</i></dt> | |
182 | <dd> | |
183 | language to remove (str) | |
184 | </dd> | |
185 | </dl><a NAME="SyntaxCheckService.syntaxCheck" ID="SyntaxCheckService.syntaxCheck"></a> | |
186 | <h4>SyntaxCheckService.syntaxCheck</h4> | |
187 | <b>syntaxCheck</b>(<i>lang, filename, source</i>) | |
188 | <p> | |
3591
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
189 | Public method to prepare to compile one Python source file to Python |
2f2a4a76dd22
Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
3525
diff
changeset
|
190 | bytecode and to perform a pyflakes check. |
3456 | 191 | </p><dl> |
192 | <dt><i>lang</i></dt> | |
193 | <dd> | |
194 | language of the file or None to determine by internal | |
195 | algorithm (str or None) | |
196 | </dd><dt><i>filename</i></dt> | |
197 | <dd> | |
198 | source filename (string) | |
199 | </dd><dt><i>source</i></dt> | |
200 | <dd> | |
201 | string containing the code to check (string) | |
202 | </dd> | |
203 | </dl> | |
204 | <div align="right"><a href="#top">Up</a></div> | |
205 | <hr /> | |
206 | </body></html> |