src/eric7/Documentation/Source/eric7.Plugins.PluginSyntaxChecker.html

branch
eric7
changeset 10479
856476537696
parent 10341
3fdffd9cc21d
child 10684
58c7f23ae1cb
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
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.PluginSyntaxChecker</h1> 9 <h1>eric7.Plugins.PluginSyntaxChecker</h1>
10
11 <p> 10 <p>
12 Module implementing the Syntax Checker plugin. 11 Module implementing the Syntax Checker plugin.
13 </p> 12 </p>
13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15 15 <table>
16 <table> 16 <tr><td>__header__</td></tr>
17 <tr><td>__header__</td></tr><tr><td>error</td></tr> 17 <tr><td>error</td></tr>
18 </table> 18 </table>
19
19 <h3>Classes</h3> 20 <h3>Classes</h3>
20 21 <table>
21 <table>
22
23 <tr> 22 <tr>
24 <td><a href="#SyntaxCheckerPlugin">SyntaxCheckerPlugin</a></td> 23 <td><a href="#SyntaxCheckerPlugin">SyntaxCheckerPlugin</a></td>
25 <td>Class implementing the Syntax Checker plugin.</td> 24 <td>Class implementing the Syntax Checker plugin.</td>
26 </tr> 25 </tr>
27 </table> 26 </table>
27
28 <h3>Functions</h3> 28 <h3>Functions</h3>
29
30 <table> 29 <table>
31 <tr><td>None</td></tr> 30 <tr><td>None</td></tr>
32 </table> 31 </table>
32
33 <hr /> 33 <hr />
34 <hr /> 34 <hr />
35 <a NAME="SyntaxCheckerPlugin" ID="SyntaxCheckerPlugin"></a> 35 <a NAME="SyntaxCheckerPlugin" ID="SyntaxCheckerPlugin"></a>
36 <h2>SyntaxCheckerPlugin</h2> 36 <h2>SyntaxCheckerPlugin</h2>
37
38 <p> 37 <p>
39 Class implementing the Syntax Checker plugin. 38 Class implementing the Syntax Checker plugin.
40 </p> 39 </p>
40
41 <h3>Derived from</h3> 41 <h3>Derived from</h3>
42 QObject 42 QObject
43 <h3>Class Attributes</h3> 43 <h3>Class Attributes</h3>
44
45 <table> 44 <table>
46 <tr><td>None</td></tr> 45 <tr><td>None</td></tr>
47 </table> 46 </table>
47
48 <h3>Class Methods</h3> 48 <h3>Class Methods</h3>
49
50 <table> 49 <table>
51 <tr><td>None</td></tr> 50 <tr><td>None</td></tr>
52 </table> 51 </table>
52
53 <h3>Methods</h3> 53 <h3>Methods</h3>
54 54 <table>
55 <table>
56
57 <tr> 55 <tr>
58 <td><a href="#SyntaxCheckerPlugin.__init__">SyntaxCheckerPlugin</a></td> 56 <td><a href="#SyntaxCheckerPlugin.__init__">SyntaxCheckerPlugin</a></td>
59 <td>Constructor</td> 57 <td>Constructor</td>
60 </tr> 58 </tr>
61 <tr> 59 <tr>
109 <tr> 107 <tr>
110 <td><a href="#SyntaxCheckerPlugin.deactivate">deactivate</a></td> 108 <td><a href="#SyntaxCheckerPlugin.deactivate">deactivate</a></td>
111 <td>Public method to deactivate this plugin.</td> 109 <td>Public method to deactivate this plugin.</td>
112 </tr> 110 </tr>
113 </table> 111 </table>
112
114 <h3>Static Methods</h3> 113 <h3>Static Methods</h3>
115
116 <table> 114 <table>
117 <tr><td>None</td></tr> 115 <tr><td>None</td></tr>
118 </table> 116 </table>
117
119 118
120 <a NAME="SyntaxCheckerPlugin.__init__" ID="SyntaxCheckerPlugin.__init__"></a> 119 <a NAME="SyntaxCheckerPlugin.__init__" ID="SyntaxCheckerPlugin.__init__"></a>
121 <h4>SyntaxCheckerPlugin (Constructor)</h4> 120 <h4>SyntaxCheckerPlugin (Constructor)</h4>
122 <b>SyntaxCheckerPlugin</b>(<i>ui</i>) 121 <b>SyntaxCheckerPlugin</b>(<i>ui</i>)
123
124 <p> 122 <p>
125 Constructor 123 Constructor
126 </p> 124 </p>
125
127 <dl> 126 <dl>
128 127
129 <dt><i>ui</i> (UI.UserInterface)</dt> 128 <dt><i>ui</i> (UI.UserInterface)</dt>
130 <dd> 129 <dd>
131 reference to the user interface object 130 reference to the user interface object
132 </dd> 131 </dd>
133 </dl> 132 </dl>
134 <a NAME="SyntaxCheckerPlugin.__editorClosed" ID="SyntaxCheckerPlugin.__editorClosed"></a> 133 <a NAME="SyntaxCheckerPlugin.__editorClosed" ID="SyntaxCheckerPlugin.__editorClosed"></a>
135 <h4>SyntaxCheckerPlugin.__editorClosed</h4> 134 <h4>SyntaxCheckerPlugin.__editorClosed</h4>
136 <b>__editorClosed</b>(<i>editor</i>) 135 <b>__editorClosed</b>(<i>editor</i>)
137
138 <p> 136 <p>
139 Private slot called, when an editor was closed. 137 Private slot called, when an editor was closed.
140 </p> 138 </p>
139
141 <dl> 140 <dl>
142 141
143 <dt><i>editor</i> (QScintilla.Editor)</dt> 142 <dt><i>editor</i> (QScintilla.Editor)</dt>
144 <dd> 143 <dd>
145 reference to the editor 144 reference to the editor
146 </dd> 145 </dd>
147 </dl> 146 </dl>
148 <a NAME="SyntaxCheckerPlugin.__editorOpened" ID="SyntaxCheckerPlugin.__editorOpened"></a> 147 <a NAME="SyntaxCheckerPlugin.__editorOpened" ID="SyntaxCheckerPlugin.__editorOpened"></a>
149 <h4>SyntaxCheckerPlugin.__editorOpened</h4> 148 <h4>SyntaxCheckerPlugin.__editorOpened</h4>
150 <b>__editorOpened</b>(<i>editor</i>) 149 <b>__editorOpened</b>(<i>editor</i>)
151
152 <p> 150 <p>
153 Private slot called, when a new editor was opened. 151 Private slot called, when a new editor was opened.
154 </p> 152 </p>
153
155 <dl> 154 <dl>
156 155
157 <dt><i>editor</i> (QScintilla.Editor)</dt> 156 <dt><i>editor</i> (QScintilla.Editor)</dt>
158 <dd> 157 <dd>
159 reference to the new editor 158 reference to the new editor
160 </dd> 159 </dd>
161 </dl> 160 </dl>
162 <a NAME="SyntaxCheckerPlugin.__editorShowMenu" ID="SyntaxCheckerPlugin.__editorShowMenu"></a> 161 <a NAME="SyntaxCheckerPlugin.__editorShowMenu" ID="SyntaxCheckerPlugin.__editorShowMenu"></a>
163 <h4>SyntaxCheckerPlugin.__editorShowMenu</h4> 162 <h4>SyntaxCheckerPlugin.__editorShowMenu</h4>
164 <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>) 163 <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>)
165
166 <p> 164 <p>
167 Private slot called, when the the editor context menu or a submenu is 165 Private slot called, when the the editor context menu or a submenu is
168 about to be shown. 166 about to be shown.
169 </p> 167 </p>
168
170 <dl> 169 <dl>
171 170
172 <dt><i>menuName</i> (str)</dt> 171 <dt><i>menuName</i> (str)</dt>
173 <dd> 172 <dd>
174 name of the menu to be shown 173 name of the menu to be shown
183 </dd> 182 </dd>
184 </dl> 183 </dl>
185 <a NAME="SyntaxCheckerPlugin.__editorSyntaxCheck" ID="SyntaxCheckerPlugin.__editorSyntaxCheck"></a> 184 <a NAME="SyntaxCheckerPlugin.__editorSyntaxCheck" ID="SyntaxCheckerPlugin.__editorSyntaxCheck"></a>
186 <h4>SyntaxCheckerPlugin.__editorSyntaxCheck</h4> 185 <h4>SyntaxCheckerPlugin.__editorSyntaxCheck</h4>
187 <b>__editorSyntaxCheck</b>(<i></i>) 186 <b>__editorSyntaxCheck</b>(<i></i>)
188
189 <p> 187 <p>
190 Private slot to handle the syntax check context menu action of the 188 Private slot to handle the syntax check context menu action of the
191 editors. 189 editors.
192 </p> 190 </p>
191
193 <a NAME="SyntaxCheckerPlugin.__getPythonOptions" ID="SyntaxCheckerPlugin.__getPythonOptions"></a> 192 <a NAME="SyntaxCheckerPlugin.__getPythonOptions" ID="SyntaxCheckerPlugin.__getPythonOptions"></a>
194 <h4>SyntaxCheckerPlugin.__getPythonOptions</h4> 193 <h4>SyntaxCheckerPlugin.__getPythonOptions</h4>
195 <b>__getPythonOptions</b>(<i></i>) 194 <b>__getPythonOptions</b>(<i></i>)
196
197 <p> 195 <p>
198 Private method to determine the syntax check options. 196 Private method to determine the syntax check options.
199 </p> 197 </p>
198
200 <dl> 199 <dl>
201 <dt>Return:</dt> 200 <dt>Return:</dt>
202 <dd> 201 <dd>
203 tuple containing a flag indicating to perform a pyflakes check and 202 tuple containing a flag indicating to perform a pyflakes check and
204 a flag indicating to ignore star import warnings 203 a flag indicating to ignore star import warnings
211 </dd> 210 </dd>
212 </dl> 211 </dl>
213 <a NAME="SyntaxCheckerPlugin.__initialize" ID="SyntaxCheckerPlugin.__initialize"></a> 212 <a NAME="SyntaxCheckerPlugin.__initialize" ID="SyntaxCheckerPlugin.__initialize"></a>
214 <h4>SyntaxCheckerPlugin.__initialize</h4> 213 <h4>SyntaxCheckerPlugin.__initialize</h4>
215 <b>__initialize</b>(<i></i>) 214 <b>__initialize</b>(<i></i>)
216
217 <p> 215 <p>
218 Private slot to (re)initialize the plugin. 216 Private slot to (re)initialize the plugin.
219 </p> 217 </p>
218
220 <a NAME="SyntaxCheckerPlugin.__projectBrowserShowMenu" ID="SyntaxCheckerPlugin.__projectBrowserShowMenu"></a> 219 <a NAME="SyntaxCheckerPlugin.__projectBrowserShowMenu" ID="SyntaxCheckerPlugin.__projectBrowserShowMenu"></a>
221 <h4>SyntaxCheckerPlugin.__projectBrowserShowMenu</h4> 220 <h4>SyntaxCheckerPlugin.__projectBrowserShowMenu</h4>
222 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>) 221 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>)
223
224 <p> 222 <p>
225 Private slot called, when the the project browser menu or a submenu is 223 Private slot called, when the the project browser menu or a submenu is
226 about to be shown. 224 about to be shown.
227 </p> 225 </p>
226
228 <dl> 227 <dl>
229 228
230 <dt><i>menuName</i> (str)</dt> 229 <dt><i>menuName</i> (str)</dt>
231 <dd> 230 <dd>
232 name of the menu to be shown 231 name of the menu to be shown
237 </dd> 236 </dd>
238 </dl> 237 </dl>
239 <a NAME="SyntaxCheckerPlugin.__projectBrowserSyntaxCheck" ID="SyntaxCheckerPlugin.__projectBrowserSyntaxCheck"></a> 238 <a NAME="SyntaxCheckerPlugin.__projectBrowserSyntaxCheck" ID="SyntaxCheckerPlugin.__projectBrowserSyntaxCheck"></a>
240 <h4>SyntaxCheckerPlugin.__projectBrowserSyntaxCheck</h4> 239 <h4>SyntaxCheckerPlugin.__projectBrowserSyntaxCheck</h4>
241 <b>__projectBrowserSyntaxCheck</b>(<i></i>) 240 <b>__projectBrowserSyntaxCheck</b>(<i></i>)
242
243 <p> 241 <p>
244 Private method to handle the syntax check context menu action of the 242 Private method to handle the syntax check context menu action of the
245 project sources browser. 243 project sources browser.
246 </p> 244 </p>
245
247 <a NAME="SyntaxCheckerPlugin.__projectShowMenu" ID="SyntaxCheckerPlugin.__projectShowMenu"></a> 246 <a NAME="SyntaxCheckerPlugin.__projectShowMenu" ID="SyntaxCheckerPlugin.__projectShowMenu"></a>
248 <h4>SyntaxCheckerPlugin.__projectShowMenu</h4> 247 <h4>SyntaxCheckerPlugin.__projectShowMenu</h4>
249 <b>__projectShowMenu</b>(<i>menuName, menu</i>) 248 <b>__projectShowMenu</b>(<i>menuName, menu</i>)
250
251 <p> 249 <p>
252 Private slot called, when the the project menu or a submenu is 250 Private slot called, when the the project menu or a submenu is
253 about to be shown. 251 about to be shown.
254 </p> 252 </p>
253
255 <dl> 254 <dl>
256 255
257 <dt><i>menuName</i> (str)</dt> 256 <dt><i>menuName</i> (str)</dt>
258 <dd> 257 <dd>
259 name of the menu to be shown 258 name of the menu to be shown
264 </dd> 263 </dd>
265 </dl> 264 </dl>
266 <a NAME="SyntaxCheckerPlugin.__projectSyntaxCheck" ID="SyntaxCheckerPlugin.__projectSyntaxCheck"></a> 265 <a NAME="SyntaxCheckerPlugin.__projectSyntaxCheck" ID="SyntaxCheckerPlugin.__projectSyntaxCheck"></a>
267 <h4>SyntaxCheckerPlugin.__projectSyntaxCheck</h4> 266 <h4>SyntaxCheckerPlugin.__projectSyntaxCheck</h4>
268 <b>__projectSyntaxCheck</b>(<i></i>) 267 <b>__projectSyntaxCheck</b>(<i></i>)
269
270 <p> 268 <p>
271 Private slot used to check the project files for syntax errors. 269 Private slot used to check the project files for syntax errors.
272 </p> 270 </p>
271
273 <a NAME="SyntaxCheckerPlugin.__translateSyntaxCheck" ID="SyntaxCheckerPlugin.__translateSyntaxCheck"></a> 272 <a NAME="SyntaxCheckerPlugin.__translateSyntaxCheck" ID="SyntaxCheckerPlugin.__translateSyntaxCheck"></a>
274 <h4>SyntaxCheckerPlugin.__translateSyntaxCheck</h4> 273 <h4>SyntaxCheckerPlugin.__translateSyntaxCheck</h4>
275 <b>__translateSyntaxCheck</b>(<i>fn, problems</i>) 274 <b>__translateSyntaxCheck</b>(<i>fn, problems</i>)
276
277 <p> 275 <p>
278 Private slot to translate the resulting messages. 276 Private slot to translate the resulting messages.
279 </p> 277 </p>
280 <p> 278 <p>
281 If checkFlakes is True, warnings contains a list of strings containing 279 If checkFlakes is True, warnings contains a list of strings containing
282 the warnings (marker, file name, line number, message) 280 the warnings (marker, file name, line number, message)
283 The values are only valid, if nok is False. 281 The values are only valid, if nok is False.
284 </p> 282 </p>
283
285 <dl> 284 <dl>
286 285
287 <dt><i>fn</i> (str)</dt> 286 <dt><i>fn</i> (str)</dt>
288 <dd> 287 <dd>
289 filename of the checked file 288 filename of the checked file
299 </dd> 298 </dd>
300 </dl> 299 </dl>
301 <a NAME="SyntaxCheckerPlugin.activate" ID="SyntaxCheckerPlugin.activate"></a> 300 <a NAME="SyntaxCheckerPlugin.activate" ID="SyntaxCheckerPlugin.activate"></a>
302 <h4>SyntaxCheckerPlugin.activate</h4> 301 <h4>SyntaxCheckerPlugin.activate</h4>
303 <b>activate</b>(<i></i>) 302 <b>activate</b>(<i></i>)
304
305 <p> 303 <p>
306 Public method to activate this plugin. 304 Public method to activate this plugin.
307 </p> 305 </p>
306
308 <dl> 307 <dl>
309 <dt>Return:</dt> 308 <dt>Return:</dt>
310 <dd> 309 <dd>
311 tuple of None and activation status 310 tuple of None and activation status
312 </dd> 311 </dd>
318 </dd> 317 </dd>
319 </dl> 318 </dl>
320 <a NAME="SyntaxCheckerPlugin.deactivate" ID="SyntaxCheckerPlugin.deactivate"></a> 319 <a NAME="SyntaxCheckerPlugin.deactivate" ID="SyntaxCheckerPlugin.deactivate"></a>
321 <h4>SyntaxCheckerPlugin.deactivate</h4> 320 <h4>SyntaxCheckerPlugin.deactivate</h4>
322 <b>deactivate</b>(<i></i>) 321 <b>deactivate</b>(<i></i>)
323
324 <p> 322 <p>
325 Public method to deactivate this plugin. 323 Public method to deactivate this plugin.
326 </p> 324 </p>
325
327 <div align="right"><a href="#top">Up</a></div> 326 <div align="right"><a href="#top">Up</a></div>
328 <hr /> 327 <hr />
329 </body></html> 328 </body></html>

eric ide

mercurial