5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog</h1> |
9 <h1>eric7.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckerDialog</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a simple Python syntax checker. |
11 Module implementing a simple Python syntax checker. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>None</td></tr> |
16 <tr><td>None</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#SyntaxCheckerDialog">SyntaxCheckerDialog</a></td> |
22 <td><a href="#SyntaxCheckerDialog">SyntaxCheckerDialog</a></td> |
25 <td>Class implementing a dialog to display the results of a syntax check run.</td> |
23 <td>Class implementing a dialog to display the results of a syntax check run.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
|
30 <table> |
28 <table> |
31 <tr><td>None</td></tr> |
29 <tr><td>None</td></tr> |
32 </table> |
30 </table> |
|
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="SyntaxCheckerDialog" ID="SyntaxCheckerDialog"></a> |
34 <a NAME="SyntaxCheckerDialog" ID="SyntaxCheckerDialog"></a> |
36 <h2>SyntaxCheckerDialog</h2> |
35 <h2>SyntaxCheckerDialog</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing a dialog to display the results of a syntax check run. |
37 Class implementing a dialog to display the results of a syntax check run. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 QDialog, Ui_SyntaxCheckerDialog |
41 QDialog, Ui_SyntaxCheckerDialog |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
43 <table> |
45 <table> |
44 <tr><td>errorRole</td></tr> |
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> |
45 <tr><td>filenameRole</td></tr> |
47 </table> |
46 <tr><td>indexRole</td></tr> |
|
47 <tr><td>lineRole</td></tr> |
|
48 <tr><td>warningRole</td></tr> |
|
49 </table> |
|
50 |
48 <h3>Class Methods</h3> |
51 <h3>Class Methods</h3> |
49 |
|
50 <table> |
52 <table> |
51 <tr><td>None</td></tr> |
53 <tr><td>None</td></tr> |
52 </table> |
54 </table> |
|
55 |
53 <h3>Methods</h3> |
56 <h3>Methods</h3> |
54 |
57 <table> |
55 <table> |
|
56 |
|
57 <tr> |
58 <tr> |
58 <td><a href="#SyntaxCheckerDialog.__init__">SyntaxCheckerDialog</a></td> |
59 <td><a href="#SyntaxCheckerDialog.__init__">SyntaxCheckerDialog</a></td> |
59 <td>Constructor</td> |
60 <td>Constructor</td> |
60 </tr> |
61 </tr> |
61 <tr> |
62 <tr> |
161 <tr> |
162 <tr> |
162 <td><a href="#SyntaxCheckerDialog.startForBrowser">startForBrowser</a></td> |
163 <td><a href="#SyntaxCheckerDialog.startForBrowser">startForBrowser</a></td> |
163 <td>Public slot to start the syntax check for the project sources browser.</td> |
164 <td>Public slot to start the syntax check for the project sources browser.</td> |
164 </tr> |
165 </tr> |
165 </table> |
166 </table> |
|
167 |
166 <h3>Static Methods</h3> |
168 <h3>Static Methods</h3> |
167 |
|
168 <table> |
169 <table> |
169 <tr><td>None</td></tr> |
170 <tr><td>None</td></tr> |
170 </table> |
171 </table> |
|
172 |
171 |
173 |
172 <a NAME="SyntaxCheckerDialog.__init__" ID="SyntaxCheckerDialog.__init__"></a> |
174 <a NAME="SyntaxCheckerDialog.__init__" ID="SyntaxCheckerDialog.__init__"></a> |
173 <h4>SyntaxCheckerDialog (Constructor)</h4> |
175 <h4>SyntaxCheckerDialog (Constructor)</h4> |
174 <b>SyntaxCheckerDialog</b>(<i>parent=None</i>) |
176 <b>SyntaxCheckerDialog</b>(<i>parent=None</i>) |
175 |
|
176 <p> |
177 <p> |
177 Constructor |
178 Constructor |
178 </p> |
179 </p> |
|
180 |
179 <dl> |
181 <dl> |
180 |
182 |
181 <dt><i>parent</i> (QWidget)</dt> |
183 <dt><i>parent</i> (QWidget)</dt> |
182 <dd> |
184 <dd> |
183 reference to the parent widget |
185 reference to the parent widget |
184 </dd> |
186 </dd> |
185 </dl> |
187 </dl> |
186 <a NAME="SyntaxCheckerDialog.__batchFinished" ID="SyntaxCheckerDialog.__batchFinished"></a> |
188 <a NAME="SyntaxCheckerDialog.__batchFinished" ID="SyntaxCheckerDialog.__batchFinished"></a> |
187 <h4>SyntaxCheckerDialog.__batchFinished</h4> |
189 <h4>SyntaxCheckerDialog.__batchFinished</h4> |
188 <b>__batchFinished</b>(<i></i>) |
190 <b>__batchFinished</b>(<i></i>) |
189 |
|
190 <p> |
191 <p> |
191 Private slot handling the completion of a batch job. |
192 Private slot handling the completion of a batch job. |
192 </p> |
193 </p> |
|
194 |
193 <a NAME="SyntaxCheckerDialog.__cancel" ID="SyntaxCheckerDialog.__cancel"></a> |
195 <a NAME="SyntaxCheckerDialog.__cancel" ID="SyntaxCheckerDialog.__cancel"></a> |
194 <h4>SyntaxCheckerDialog.__cancel</h4> |
196 <h4>SyntaxCheckerDialog.__cancel</h4> |
195 <b>__cancel</b>(<i></i>) |
197 <b>__cancel</b>(<i></i>) |
196 |
|
197 <p> |
198 <p> |
198 Private method to cancel the current check run. |
199 Private method to cancel the current check run. |
199 </p> |
200 </p> |
|
201 |
200 <a NAME="SyntaxCheckerDialog.__clearErrors" ID="SyntaxCheckerDialog.__clearErrors"></a> |
202 <a NAME="SyntaxCheckerDialog.__clearErrors" ID="SyntaxCheckerDialog.__clearErrors"></a> |
201 <h4>SyntaxCheckerDialog.__clearErrors</h4> |
203 <h4>SyntaxCheckerDialog.__clearErrors</h4> |
202 <b>__clearErrors</b>(<i>files</i>) |
204 <b>__clearErrors</b>(<i>files</i>) |
203 |
|
204 <p> |
205 <p> |
205 Private method to clear all error and warning markers of |
206 Private method to clear all error and warning markers of |
206 open editors to be checked. |
207 open editors to be checked. |
207 </p> |
208 </p> |
|
209 |
208 <dl> |
210 <dl> |
209 |
211 |
210 <dt><i>files</i> (list of str)</dt> |
212 <dt><i>files</i> (list of str)</dt> |
211 <dd> |
213 <dd> |
212 list of files to be checked |
214 list of files to be checked |
213 </dd> |
215 </dd> |
214 </dl> |
216 </dl> |
215 <a NAME="SyntaxCheckerDialog.__createErrorItem" ID="SyntaxCheckerDialog.__createErrorItem"></a> |
217 <a NAME="SyntaxCheckerDialog.__createErrorItem" ID="SyntaxCheckerDialog.__createErrorItem"></a> |
216 <h4>SyntaxCheckerDialog.__createErrorItem</h4> |
218 <h4>SyntaxCheckerDialog.__createErrorItem</h4> |
217 <b>__createErrorItem</b>(<i>filename, message</i>) |
219 <b>__createErrorItem</b>(<i>filename, message</i>) |
218 |
|
219 <p> |
220 <p> |
220 Private slot to create a new error item in the result list. |
221 Private slot to create a new error item in the result list. |
221 </p> |
222 </p> |
|
223 |
222 <dl> |
224 <dl> |
223 |
225 |
224 <dt><i>filename</i> (str)</dt> |
226 <dt><i>filename</i> (str)</dt> |
225 <dd> |
227 <dd> |
226 name of the file |
228 name of the file |
379 </dd> |
381 </dd> |
380 </dl> |
382 </dl> |
381 <a NAME="SyntaxCheckerDialog.__resetStatistics" ID="SyntaxCheckerDialog.__resetStatistics"></a> |
383 <a NAME="SyntaxCheckerDialog.__resetStatistics" ID="SyntaxCheckerDialog.__resetStatistics"></a> |
382 <h4>SyntaxCheckerDialog.__resetStatistics</h4> |
384 <h4>SyntaxCheckerDialog.__resetStatistics</h4> |
383 <b>__resetStatistics</b>(<i>skipped</i>) |
385 <b>__resetStatistics</b>(<i>skipped</i>) |
384 |
|
385 <p> |
386 <p> |
386 Private method to reset the statistics data. |
387 Private method to reset the statistics data. |
387 </p> |
388 </p> |
|
389 |
388 <dl> |
390 <dl> |
389 |
391 |
390 <dt><i>skipped</i> (int)</dt> |
392 <dt><i>skipped</i> (int)</dt> |
391 <dd> |
393 <dd> |
392 number of files not being checked |
394 number of files not being checked |
393 </dd> |
395 </dd> |
394 </dl> |
396 </dl> |
395 <a NAME="SyntaxCheckerDialog.__resort" ID="SyntaxCheckerDialog.__resort"></a> |
397 <a NAME="SyntaxCheckerDialog.__resort" ID="SyntaxCheckerDialog.__resort"></a> |
396 <h4>SyntaxCheckerDialog.__resort</h4> |
398 <h4>SyntaxCheckerDialog.__resort</h4> |
397 <b>__resort</b>(<i></i>) |
399 <b>__resort</b>(<i></i>) |
398 |
|
399 <p> |
400 <p> |
400 Private method to resort the tree. |
401 Private method to resort the tree. |
401 </p> |
402 </p> |
|
403 |
402 <a NAME="SyntaxCheckerDialog.__updateStatistics" ID="SyntaxCheckerDialog.__updateStatistics"></a> |
404 <a NAME="SyntaxCheckerDialog.__updateStatistics" ID="SyntaxCheckerDialog.__updateStatistics"></a> |
403 <h4>SyntaxCheckerDialog.__updateStatistics</h4> |
405 <h4>SyntaxCheckerDialog.__updateStatistics</h4> |
404 <b>__updateStatistics</b>(<i>fileStatistics</i>) |
406 <b>__updateStatistics</b>(<i>fileStatistics</i>) |
405 |
|
406 <p> |
407 <p> |
407 Private method to update the statistics. |
408 Private method to update the statistics. |
408 </p> |
409 </p> |
|
410 |
409 <dl> |
411 <dl> |
410 |
412 |
411 <dt><i>fileStatistics</i> (dict)</dt> |
413 <dt><i>fileStatistics</i> (dict)</dt> |
412 <dd> |
414 <dd> |
413 dictionary containing the file statistics |
415 dictionary containing the file statistics |
414 </dd> |
416 </dd> |
415 </dl> |
417 </dl> |
416 <a NAME="SyntaxCheckerDialog.__updateStatisticsArea" ID="SyntaxCheckerDialog.__updateStatisticsArea"></a> |
418 <a NAME="SyntaxCheckerDialog.__updateStatisticsArea" ID="SyntaxCheckerDialog.__updateStatisticsArea"></a> |
417 <h4>SyntaxCheckerDialog.__updateStatisticsArea</h4> |
419 <h4>SyntaxCheckerDialog.__updateStatisticsArea</h4> |
418 <b>__updateStatisticsArea</b>(<i></i>) |
420 <b>__updateStatisticsArea</b>(<i></i>) |
419 |
|
420 <p> |
421 <p> |
421 Private method to update the statistics area of the dialog. |
422 Private method to update the statistics area of the dialog. |
422 </p> |
423 </p> |
|
424 |
423 <a NAME="SyntaxCheckerDialog.check" ID="SyntaxCheckerDialog.check"></a> |
425 <a NAME="SyntaxCheckerDialog.check" ID="SyntaxCheckerDialog.check"></a> |
424 <h4>SyntaxCheckerDialog.check</h4> |
426 <h4>SyntaxCheckerDialog.check</h4> |
425 <b>check</b>(<i>codestring=""</i>) |
427 <b>check</b>(<i>codestring=""</i>) |
426 |
|
427 <p> |
428 <p> |
428 Public method to start a check for one file. |
429 Public method to start a check for one file. |
429 </p> |
430 </p> |
430 <p> |
431 <p> |
431 The results are reported to the __processResult slot. |
432 The results are reported to the __processResult slot. |
432 </p> |
433 </p> |
|
434 |
433 <dl> |
435 <dl> |
434 |
436 |
435 <dt><i>codestring</i> (str)</dt> |
437 <dt><i>codestring</i> (str)</dt> |
436 <dd> |
438 <dd> |
437 optional sourcestring |
439 optional sourcestring |
438 </dd> |
440 </dd> |
439 </dl> |
441 </dl> |
440 <a NAME="SyntaxCheckerDialog.checkBatch" ID="SyntaxCheckerDialog.checkBatch"></a> |
442 <a NAME="SyntaxCheckerDialog.checkBatch" ID="SyntaxCheckerDialog.checkBatch"></a> |
441 <h4>SyntaxCheckerDialog.checkBatch</h4> |
443 <h4>SyntaxCheckerDialog.checkBatch</h4> |
442 <b>checkBatch</b>(<i></i>) |
444 <b>checkBatch</b>(<i></i>) |
443 |
|
444 <p> |
445 <p> |
445 Public method to start a style check batch job. |
446 Public method to start a style check batch job. |
446 </p> |
447 </p> |
447 <p> |
448 <p> |
448 The results are reported to the __processResult slot. |
449 The results are reported to the __processResult slot. |
449 </p> |
450 </p> |
|
451 |
450 <a NAME="SyntaxCheckerDialog.closeEvent" ID="SyntaxCheckerDialog.closeEvent"></a> |
452 <a NAME="SyntaxCheckerDialog.closeEvent" ID="SyntaxCheckerDialog.closeEvent"></a> |
451 <h4>SyntaxCheckerDialog.closeEvent</h4> |
453 <h4>SyntaxCheckerDialog.closeEvent</h4> |
452 <b>closeEvent</b>(<i>evt</i>) |
454 <b>closeEvent</b>(<i>evt</i>) |
453 |
|
454 <p> |
455 <p> |
455 Protected method to handle a close event. |
456 Protected method to handle a close event. |
456 </p> |
457 </p> |
|
458 |
457 <dl> |
459 <dl> |
458 |
460 |
459 <dt><i>evt</i> (QCloseEvent)</dt> |
461 <dt><i>evt</i> (QCloseEvent)</dt> |
460 <dd> |
462 <dd> |
461 reference to the close event |
463 reference to the close event |
462 </dd> |
464 </dd> |
463 </dl> |
465 </dl> |
464 <a NAME="SyntaxCheckerDialog.on_buttonBox_clicked" ID="SyntaxCheckerDialog.on_buttonBox_clicked"></a> |
466 <a NAME="SyntaxCheckerDialog.on_buttonBox_clicked" ID="SyntaxCheckerDialog.on_buttonBox_clicked"></a> |
465 <h4>SyntaxCheckerDialog.on_buttonBox_clicked</h4> |
467 <h4>SyntaxCheckerDialog.on_buttonBox_clicked</h4> |
466 <b>on_buttonBox_clicked</b>(<i>button</i>) |
468 <b>on_buttonBox_clicked</b>(<i>button</i>) |
467 |
|
468 <p> |
469 <p> |
469 Private slot called by a button of the button box clicked. |
470 Private slot called by a button of the button box clicked. |
470 </p> |
471 </p> |
|
472 |
471 <dl> |
473 <dl> |
472 |
474 |
473 <dt><i>button</i> (QAbstractButton)</dt> |
475 <dt><i>button</i> (QAbstractButton)</dt> |
474 <dd> |
476 <dd> |
475 button that was clicked |
477 button that was clicked |
476 </dd> |
478 </dd> |
477 </dl> |
479 </dl> |
478 <a NAME="SyntaxCheckerDialog.on_resultList_itemActivated" ID="SyntaxCheckerDialog.on_resultList_itemActivated"></a> |
480 <a NAME="SyntaxCheckerDialog.on_resultList_itemActivated" ID="SyntaxCheckerDialog.on_resultList_itemActivated"></a> |
479 <h4>SyntaxCheckerDialog.on_resultList_itemActivated</h4> |
481 <h4>SyntaxCheckerDialog.on_resultList_itemActivated</h4> |
480 <b>on_resultList_itemActivated</b>(<i>itm, col</i>) |
482 <b>on_resultList_itemActivated</b>(<i>itm, col</i>) |
481 |
|
482 <p> |
483 <p> |
483 Private slot to handle the activation of an item. |
484 Private slot to handle the activation of an item. |
484 </p> |
485 </p> |
|
486 |
485 <dl> |
487 <dl> |
486 |
488 |
487 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
489 <dt><i>itm</i> (QTreeWidgetItem)</dt> |
488 <dd> |
490 <dd> |
489 reference to the activated item |
491 reference to the activated item |
494 </dd> |
496 </dd> |
495 </dl> |
497 </dl> |
496 <a NAME="SyntaxCheckerDialog.on_showButton_clicked" ID="SyntaxCheckerDialog.on_showButton_clicked"></a> |
498 <a NAME="SyntaxCheckerDialog.on_showButton_clicked" ID="SyntaxCheckerDialog.on_showButton_clicked"></a> |
497 <h4>SyntaxCheckerDialog.on_showButton_clicked</h4> |
499 <h4>SyntaxCheckerDialog.on_showButton_clicked</h4> |
498 <b>on_showButton_clicked</b>(<i></i>) |
500 <b>on_showButton_clicked</b>(<i></i>) |
499 |
|
500 <p> |
501 <p> |
501 Private slot to handle the "Show" button press. |
502 Private slot to handle the "Show" button press. |
502 </p> |
503 </p> |
|
504 |
503 <a NAME="SyntaxCheckerDialog.on_startButton_clicked" ID="SyntaxCheckerDialog.on_startButton_clicked"></a> |
505 <a NAME="SyntaxCheckerDialog.on_startButton_clicked" ID="SyntaxCheckerDialog.on_startButton_clicked"></a> |
504 <h4>SyntaxCheckerDialog.on_startButton_clicked</h4> |
506 <h4>SyntaxCheckerDialog.on_startButton_clicked</h4> |
505 <b>on_startButton_clicked</b>(<i></i>) |
507 <b>on_startButton_clicked</b>(<i></i>) |
506 |
|
507 <p> |
508 <p> |
508 Private slot to start a syntax check run. |
509 Private slot to start a syntax check run. |
509 </p> |
510 </p> |
|
511 |
510 <a NAME="SyntaxCheckerDialog.prepare" ID="SyntaxCheckerDialog.prepare"></a> |
512 <a NAME="SyntaxCheckerDialog.prepare" ID="SyntaxCheckerDialog.prepare"></a> |
511 <h4>SyntaxCheckerDialog.prepare</h4> |
513 <h4>SyntaxCheckerDialog.prepare</h4> |
512 <b>prepare</b>(<i>fileList, project</i>) |
514 <b>prepare</b>(<i>fileList, project</i>) |
513 |
|
514 <p> |
515 <p> |
515 Public method to prepare the dialog with a list of filenames. |
516 Public method to prepare the dialog with a list of filenames. |
516 </p> |
517 </p> |
|
518 |
517 <dl> |
519 <dl> |
518 |
520 |
519 <dt><i>fileList</i> (list of str)</dt> |
521 <dt><i>fileList</i> (list of str)</dt> |
520 <dd> |
522 <dd> |
521 list of filenames |
523 list of filenames |
526 </dd> |
528 </dd> |
527 </dl> |
529 </dl> |
528 <a NAME="SyntaxCheckerDialog.setArguments" ID="SyntaxCheckerDialog.setArguments"></a> |
530 <a NAME="SyntaxCheckerDialog.setArguments" ID="SyntaxCheckerDialog.setArguments"></a> |
529 <h4>SyntaxCheckerDialog.setArguments</h4> |
531 <h4>SyntaxCheckerDialog.setArguments</h4> |
530 <b>setArguments</b>(<i>args</i>) |
532 <b>setArguments</b>(<i>args</i>) |
531 |
|
532 <p> |
533 <p> |
533 Public method to set additional arguments to be used by the syntax check. |
534 Public method to set additional arguments to be used by the syntax check. |
534 </p> |
535 </p> |
|
536 |
535 <dl> |
537 <dl> |
536 |
538 |
537 <dt><i>args</i> (tuple of Any)</dt> |
539 <dt><i>args</i> (tuple of Any)</dt> |
538 <dd> |
540 <dd> |
539 tuple containing the additional arguments |
541 tuple containing the additional arguments |
540 </dd> |
542 </dd> |
541 </dl> |
543 </dl> |
542 <a NAME="SyntaxCheckerDialog.start" ID="SyntaxCheckerDialog.start"></a> |
544 <a NAME="SyntaxCheckerDialog.start" ID="SyntaxCheckerDialog.start"></a> |
543 <h4>SyntaxCheckerDialog.start</h4> |
545 <h4>SyntaxCheckerDialog.start</h4> |
544 <b>start</b>(<i>fn, codestring="", skipped=0</i>) |
546 <b>start</b>(<i>fn, codestring="", skipped=0</i>) |
545 |
|
546 <p> |
547 <p> |
547 Public slot to start the syntax check. |
548 Public slot to start the syntax check. |
548 </p> |
549 </p> |
|
550 |
549 <dl> |
551 <dl> |
550 |
552 |
551 <dt><i>fn</i> (str or list of str)</dt> |
553 <dt><i>fn</i> (str or list of str)</dt> |
552 <dd> |
554 <dd> |
553 file or list of files or directory to be checked |
555 file or list of files or directory to be checked |