Sun, 18 May 2014 14:13:09 +0200
Corrected a bunch of source docu issues.
<!DOCTYPE html> <html><head> <title>eric5.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckService</title> <meta charset="UTF-8"> <style> body { background: #EDECE6; margin: 0em 1em 10em 1em; color: black; } h1 { color: white; background: #85774A; } h2 { color: white; background: #85774A; } h3 { color: white; background: #9D936E; } h4 { color: white; background: #9D936E; } a { color: #BA6D36; } </style> </head> <body><a NAME="top" ID="top"></a> <h1>eric5.Plugins.CheckerPlugins.SyntaxChecker.SyntaxCheckService</h1> <p> Module implementing an interface to add different languages to do a syntax check. </p> <h3>Global Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#SyntaxCheckService">SyntaxCheckService</a></td> <td>Implement the syntax check service.</td> </tr> </table> <h3>Functions</h3> <table> <tr><td>None</td></tr> </table> <hr /><hr /> <a NAME="SyntaxCheckService" ID="SyntaxCheckService"></a> <h2>SyntaxCheckService</h2> <p> Implement the syntax check service. </p><p> Plugins can add other languages to the syntax check by calling addLanguage and support of an extra checker module on the client side which has to connect directly to the background service. </p><h3>Signals</h3> <dl> <dt>syntaxChecked(str, dict)</dt> <dd> emited when the syntax check was done. </dd> </dl> <h3>Derived from</h3> QObject <h3>Class Attributes</h3> <table> <tr><td>None</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#SyntaxCheckService.__init__">SyntaxCheckService</a></td> <td>Constructor</td> </tr><tr> <td><a href="#SyntaxCheckService.__determineLanguage">__determineLanguage</a></td> <td>Private methode to determine the language of the file.</td> </tr><tr> <td><a href="#SyntaxCheckService.addLanguage">addLanguage</a></td> <td>Public method to register a new language to the supported languages.</td> </tr><tr> <td><a href="#SyntaxCheckService.getExtensions">getExtensions</a></td> <td>Public method to return all supported file extensions for the syntax checker dialog.</td> </tr><tr> <td><a href="#SyntaxCheckService.getLanguages">getLanguages</a></td> <td>Public method to return the supported language names.</td> </tr><tr> <td><a href="#SyntaxCheckService.removeLanguage">removeLanguage</a></td> <td>Public method to remove the language from syntax check.</td> </tr><tr> <td><a href="#SyntaxCheckService.syntaxCheck">syntaxCheck</a></td> <td>Public method to prepare to compile one Python source file to Python bytecode and to perform a pyflakes check.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="SyntaxCheckService.__init__" ID="SyntaxCheckService.__init__"></a> <h4>SyntaxCheckService (Constructor)</h4> <b>SyntaxCheckService</b>(<i></i>) <p> Constructor </p><a NAME="SyntaxCheckService.__determineLanguage" ID="SyntaxCheckService.__determineLanguage"></a> <h4>SyntaxCheckService.__determineLanguage</h4> <b>__determineLanguage</b>(<i>filename, source</i>) <p> Private methode to determine the language of the file. </p><dl> <dt><i>filename</i></dt> <dd> of the sourcefile (str) </dd><dt><i>source</i></dt> <dd> code of the file (str) </dd> </dl><dl> <dt>Returns:</dt> <dd> language of the file or None if not found (str or None) </dd> </dl><a NAME="SyntaxCheckService.addLanguage" ID="SyntaxCheckService.addLanguage"></a> <h4>SyntaxCheckService.addLanguage</h4> <b>addLanguage</b>(<i>lang, env, path, module, getArgs, getExt, callback, onError</i>) <p> Public method to register a new language to the supported languages. </p><dl> <dt><i>lang</i></dt> <dd> new language to check syntax (str) </dd><dt><i>env</i></dt> <dd> the environment in which the checker is implemented (str) </dd><dt><i>path</i></dt> <dd> full path to the module (str) </dd><dt><i>module</i></dt> <dd> name to import (str) </dd><dt><i>getArgs</i></dt> <dd> function to collect the required arguments to call the syntax checker on client side (function) </dd><dt><i>getExt</i></dt> <dd> function that returns the supported file extensions of the syntax checker (function) </dd><dt><i>callback</i></dt> <dd> function on service response (function) </dd><dt><i>onError</i></dt> <dd> callback function if client or service isn't available (function) </dd> </dl><a NAME="SyntaxCheckService.getExtensions" ID="SyntaxCheckService.getExtensions"></a> <h4>SyntaxCheckService.getExtensions</h4> <b>getExtensions</b>(<i></i>) <p> Public method to return all supported file extensions for the syntax checker dialog. </p><dl> <dt>Returns:</dt> <dd> set of all supported file extensions (set of str) </dd> </dl><a NAME="SyntaxCheckService.getLanguages" ID="SyntaxCheckService.getLanguages"></a> <h4>SyntaxCheckService.getLanguages</h4> <b>getLanguages</b>(<i></i>) <p> Public method to return the supported language names. </p><dl> <dt>Returns:</dt> <dd> list of languanges supported (list of str) </dd> </dl><a NAME="SyntaxCheckService.removeLanguage" ID="SyntaxCheckService.removeLanguage"></a> <h4>SyntaxCheckService.removeLanguage</h4> <b>removeLanguage</b>(<i>lang</i>) <p> Public method to remove the language from syntax check. </p><dl> <dt><i>lang</i></dt> <dd> language to remove (str) </dd> </dl><a NAME="SyntaxCheckService.syntaxCheck" ID="SyntaxCheckService.syntaxCheck"></a> <h4>SyntaxCheckService.syntaxCheck</h4> <b>syntaxCheck</b>(<i>lang, filename, source</i>) <p> Public method to prepare to compile one Python source file to Python bytecode and to perform a pyflakes check. </p><dl> <dt><i>lang</i></dt> <dd> language of the file or None to determine by internal algorithm (str or None) </dd><dt><i>filename</i></dt> <dd> source filename (string) </dd><dt><i>source</i></dt> <dd> string containing the code to check (string) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>