src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8596
d64760b2da50
child 9236
db53a9efe7ef
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog</h1>
10
11 <p>
12 Module implementing a simple Python syntax checker.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#SyntaxCheckerDialog">SyntaxCheckerDialog</a></td>
25 <td>Class implementing a dialog to display the results of a syntax check run.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="SyntaxCheckerDialog" ID="SyntaxCheckerDialog"></a>
36 <h2>SyntaxCheckerDialog</h2>
37
38 <p>
39 Class implementing a dialog to display the results of a syntax check run.
40 </p>
41 <h3>Derived from</h3>
42 QDialog, Ui_SyntaxCheckerDialog
43 <h3>Class Attributes</h3>
44
45 <table>
46 <tr><td>errorRole</td></tr><tr><td>filenameRole</td></tr><tr><td>indexRole</td></tr><tr><td>lineRole</td></tr><tr><td>warningRole</td></tr>
47 </table>
48 <h3>Class Methods</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Methods</h3>
54
55 <table>
56
57 <tr>
58 <td><a href="#SyntaxCheckerDialog.__init__">SyntaxCheckerDialog</a></td>
59 <td>Constructor</td>
60 </tr>
61 <tr>
62 <td><a href="#SyntaxCheckerDialog.__batchFinished">__batchFinished</a></td>
63 <td>Private slot handling the completion of a batch job.</td>
64 </tr>
65 <tr>
66 <td><a href="#SyntaxCheckerDialog.__clearErrors">__clearErrors</a></td>
67 <td>Private method to clear all error and warning markers of open editors to be checked.</td>
68 </tr>
69 <tr>
70 <td><a href="#SyntaxCheckerDialog.__createErrorItem">__createErrorItem</a></td>
71 <td>Private slot to create a new error item in the result list.</td>
72 </tr>
73 <tr>
74 <td><a href="#SyntaxCheckerDialog.__createResultItem">__createResultItem</a></td>
75 <td>Private method to create an entry in the result list.</td>
76 </tr>
77 <tr>
78 <td><a href="#SyntaxCheckerDialog.__finish">__finish</a></td>
79 <td>Private slot called when the syntax check finished or the user pressed the button.</td>
80 </tr>
81 <tr>
82 <td><a href="#SyntaxCheckerDialog.__processError">__processError</a></td>
83 <td>Private slot to process an error indication from the service.</td>
84 </tr>
85 <tr>
86 <td><a href="#SyntaxCheckerDialog.__processResult">__processResult</a></td>
87 <td>Private slot to display the reported messages.</td>
88 </tr>
89 <tr>
90 <td><a href="#SyntaxCheckerDialog.__resort">__resort</a></td>
91 <td>Private method to resort the tree.</td>
92 </tr>
93 <tr>
94 <td><a href="#SyntaxCheckerDialog.check">check</a></td>
95 <td>Public method to start a check for one file.</td>
96 </tr>
97 <tr>
98 <td><a href="#SyntaxCheckerDialog.checkBatch">checkBatch</a></td>
99 <td>Public method to start a style check batch job.</td>
100 </tr>
101 <tr>
102 <td><a href="#SyntaxCheckerDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
103 <td>Private slot called by a button of the button box clicked.</td>
104 </tr>
105 <tr>
106 <td><a href="#SyntaxCheckerDialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td>
107 <td>Private slot to handle the activation of an item.</td>
108 </tr>
109 <tr>
110 <td><a href="#SyntaxCheckerDialog.on_showButton_clicked">on_showButton_clicked</a></td>
111 <td>Private slot to handle the "Show" button press.</td>
112 </tr>
113 <tr>
114 <td><a href="#SyntaxCheckerDialog.on_startButton_clicked">on_startButton_clicked</a></td>
115 <td>Private slot to start a syntax check run.</td>
116 </tr>
117 <tr>
118 <td><a href="#SyntaxCheckerDialog.prepare">prepare</a></td>
119 <td>Public method to prepare the dialog with a list of filenames.</td>
120 </tr>
121 <tr>
122 <td><a href="#SyntaxCheckerDialog.start">start</a></td>
123 <td>Public slot to start the syntax check.</td>
124 </tr>
125 </table>
126 <h3>Static Methods</h3>
127
128 <table>
129 <tr><td>None</td></tr>
130 </table>
131
132 <a NAME="SyntaxCheckerDialog.__init__" ID="SyntaxCheckerDialog.__init__"></a>
133 <h4>SyntaxCheckerDialog (Constructor)</h4>
134 <b>SyntaxCheckerDialog</b>(<i>parent=None</i>)
135
136 <p>
137 Constructor
138 </p>
139 <dl>
140
141 <dt><i>parent</i></dt>
142 <dd>
143 The parent widget. (QWidget)
144 </dd>
145 </dl>
146 <a NAME="SyntaxCheckerDialog.__batchFinished" ID="SyntaxCheckerDialog.__batchFinished"></a>
147 <h4>SyntaxCheckerDialog.__batchFinished</h4>
148 <b>__batchFinished</b>(<i></i>)
149
150 <p>
151 Private slot handling the completion of a batch job.
152 </p>
153 <a NAME="SyntaxCheckerDialog.__clearErrors" ID="SyntaxCheckerDialog.__clearErrors"></a>
154 <h4>SyntaxCheckerDialog.__clearErrors</h4>
155 <b>__clearErrors</b>(<i>files</i>)
156
157 <p>
158 Private method to clear all error and warning markers of
159 open editors to be checked.
160 </p>
161 <dl>
162
163 <dt><i>files</i></dt>
164 <dd>
165 list of files to be checked (list of string)
166 </dd>
167 </dl>
168 <a NAME="SyntaxCheckerDialog.__createErrorItem" ID="SyntaxCheckerDialog.__createErrorItem"></a>
169 <h4>SyntaxCheckerDialog.__createErrorItem</h4>
170 <b>__createErrorItem</b>(<i>filename, message</i>)
171
172 <p>
173 Private slot to create a new error item in the result list.
174 </p>
175 <dl>
176
177 <dt><i>filename</i> (str)</dt>
178 <dd>
179 name of the file
180 </dd>
181 <dt><i>message</i> (str)</dt>
182 <dd>
183 error message
184 </dd>
185 </dl>
186 <a NAME="SyntaxCheckerDialog.__createResultItem" ID="SyntaxCheckerDialog.__createResultItem"></a>
187 <h4>SyntaxCheckerDialog.__createResultItem</h4>
188 <b>__createResultItem</b>(<i>filename, line, index, error, sourcecode, isWarning=False</i>)
189
190 <p>
191 Private method to create an entry in the result list.
192 </p>
193 <dl>
194
195 <dt><i>filename</i></dt>
196 <dd>
197 file name of file (string)
198 </dd>
199 <dt><i>line</i></dt>
200 <dd>
201 line number of faulty source (integer or string)
202 </dd>
203 <dt><i>index</i></dt>
204 <dd>
205 index number of fault (integer)
206 </dd>
207 <dt><i>error</i></dt>
208 <dd>
209 error text (string)
210 </dd>
211 <dt><i>sourcecode</i></dt>
212 <dd>
213 faulty line of code (string)
214 </dd>
215 <dt><i>isWarning</i></dt>
216 <dd>
217 flag indicating a warning message (boolean)
218 </dd>
219 </dl>
220 <a NAME="SyntaxCheckerDialog.__finish" ID="SyntaxCheckerDialog.__finish"></a>
221 <h4>SyntaxCheckerDialog.__finish</h4>
222 <b>__finish</b>(<i></i>)
223
224 <p>
225 Private slot called when the syntax check finished or the user
226 pressed the button.
227 </p>
228 <a NAME="SyntaxCheckerDialog.__processError" ID="SyntaxCheckerDialog.__processError"></a>
229 <h4>SyntaxCheckerDialog.__processError</h4>
230 <b>__processError</b>(<i>fn, msg</i>)
231
232 <p>
233 Private slot to process an error indication from the service.
234 </p>
235 <dl>
236
237 <dt><i>fn</i> (str)</dt>
238 <dd>
239 filename of the file
240 </dd>
241 <dt><i>msg</i> (str)</dt>
242 <dd>
243 error message
244 </dd>
245 </dl>
246 <a NAME="SyntaxCheckerDialog.__processResult" ID="SyntaxCheckerDialog.__processResult"></a>
247 <h4>SyntaxCheckerDialog.__processResult</h4>
248 <b>__processResult</b>(<i>fn, problems</i>)
249
250 <p>
251 Private slot to display the reported messages.
252 </p>
253 <dl>
254
255 <dt><i>fn</i></dt>
256 <dd>
257 filename of the checked file (str)
258 </dd>
259 <dt><i>problems</i></dt>
260 <dd>
261 dictionary with the keys 'error' and 'warnings' which
262 hold a list containing details about the error/ warnings
263 (file name, line number, column, codestring (only at syntax
264 errors), the message) (dict)
265 </dd>
266 </dl>
267 <a NAME="SyntaxCheckerDialog.__resort" ID="SyntaxCheckerDialog.__resort"></a>
268 <h4>SyntaxCheckerDialog.__resort</h4>
269 <b>__resort</b>(<i></i>)
270
271 <p>
272 Private method to resort the tree.
273 </p>
274 <a NAME="SyntaxCheckerDialog.check" ID="SyntaxCheckerDialog.check"></a>
275 <h4>SyntaxCheckerDialog.check</h4>
276 <b>check</b>(<i>codestring=''</i>)
277
278 <p>
279 Public method to start a check for one file.
280 </p>
281 <p>
282 The results are reported to the __processResult slot.
283 </p>
284 <dl>
285
286 <dt><i>codestring</i></dt>
287 <dd>
288 optional sourcestring (str)
289 </dd>
290 </dl>
291 <a NAME="SyntaxCheckerDialog.checkBatch" ID="SyntaxCheckerDialog.checkBatch"></a>
292 <h4>SyntaxCheckerDialog.checkBatch</h4>
293 <b>checkBatch</b>(<i></i>)
294
295 <p>
296 Public method to start a style check batch job.
297 </p>
298 <p>
299 The results are reported to the __processResult slot.
300 </p>
301 <a NAME="SyntaxCheckerDialog.on_buttonBox_clicked" ID="SyntaxCheckerDialog.on_buttonBox_clicked"></a>
302 <h4>SyntaxCheckerDialog.on_buttonBox_clicked</h4>
303 <b>on_buttonBox_clicked</b>(<i>button</i>)
304
305 <p>
306 Private slot called by a button of the button box clicked.
307 </p>
308 <dl>
309
310 <dt><i>button</i></dt>
311 <dd>
312 button that was clicked (QAbstractButton)
313 </dd>
314 </dl>
315 <a NAME="SyntaxCheckerDialog.on_resultList_itemActivated" ID="SyntaxCheckerDialog.on_resultList_itemActivated"></a>
316 <h4>SyntaxCheckerDialog.on_resultList_itemActivated</h4>
317 <b>on_resultList_itemActivated</b>(<i>itm, col</i>)
318
319 <p>
320 Private slot to handle the activation of an item.
321 </p>
322 <dl>
323
324 <dt><i>itm</i></dt>
325 <dd>
326 reference to the activated item (QTreeWidgetItem)
327 </dd>
328 <dt><i>col</i></dt>
329 <dd>
330 column the item was activated in (integer)
331 </dd>
332 </dl>
333 <a NAME="SyntaxCheckerDialog.on_showButton_clicked" ID="SyntaxCheckerDialog.on_showButton_clicked"></a>
334 <h4>SyntaxCheckerDialog.on_showButton_clicked</h4>
335 <b>on_showButton_clicked</b>(<i></i>)
336
337 <p>
338 Private slot to handle the "Show" button press.
339 </p>
340 <a NAME="SyntaxCheckerDialog.on_startButton_clicked" ID="SyntaxCheckerDialog.on_startButton_clicked"></a>
341 <h4>SyntaxCheckerDialog.on_startButton_clicked</h4>
342 <b>on_startButton_clicked</b>(<i></i>)
343
344 <p>
345 Private slot to start a syntax check run.
346 </p>
347 <a NAME="SyntaxCheckerDialog.prepare" ID="SyntaxCheckerDialog.prepare"></a>
348 <h4>SyntaxCheckerDialog.prepare</h4>
349 <b>prepare</b>(<i>fileList, project</i>)
350
351 <p>
352 Public method to prepare the dialog with a list of filenames.
353 </p>
354 <dl>
355
356 <dt><i>fileList</i></dt>
357 <dd>
358 list of filenames (list of strings)
359 </dd>
360 <dt><i>project</i></dt>
361 <dd>
362 reference to the project object (Project)
363 </dd>
364 </dl>
365 <a NAME="SyntaxCheckerDialog.start" ID="SyntaxCheckerDialog.start"></a>
366 <h4>SyntaxCheckerDialog.start</h4>
367 <b>start</b>(<i>fn, codestring=""</i>)
368
369 <p>
370 Public slot to start the syntax check.
371 </p>
372 <dl>
373
374 <dt><i>fn</i></dt>
375 <dd>
376 file or list of files or directory to be checked
377 (string or list of strings)
378 </dd>
379 <dt><i>codestring</i></dt>
380 <dd>
381 string containing the code to be checked (string).
382 If this is given, fn must be a single file name.
383 </dd>
384 </dl>
385 <div align="right"><a href="#top">Up</a></div>
386 <hr />
387 </body></html>

eric ide

mercurial