1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Plugins.PluginTabnanny</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>eric6.Plugins.PluginTabnanny</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the Tabnanny plugin. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>error</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#TabnannyPlugin">TabnannyPlugin</a></td> |
|
39 <td>Class implementing the Tabnanny plugin.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 <tr><td>None</td></tr> |
|
46 </table> |
|
47 <hr /> |
|
48 <hr /> |
|
49 <a NAME="TabnannyPlugin" ID="TabnannyPlugin"></a> |
|
50 <h2>TabnannyPlugin</h2> |
|
51 |
|
52 <p> |
|
53 Class implementing the Tabnanny plugin. |
|
54 </p> |
|
55 <h3>Signals</h3> |
|
56 <dl> |
|
57 |
|
58 <dt>batchFinished()</dt> |
|
59 <dd> |
|
60 emitted when a style check batch is done |
|
61 </dd> |
|
62 <dt>error(str, str)</dt> |
|
63 <dd> |
|
64 emitted in case of an error |
|
65 </dd> |
|
66 <dt>indentChecked(str, bool, str, str)</dt> |
|
67 <dd> |
|
68 emitted when the indent |
|
69 check was done. |
|
70 </dd> |
|
71 </dl> |
|
72 <h3>Derived from</h3> |
|
73 QObject |
|
74 <h3>Class Attributes</h3> |
|
75 |
|
76 <table> |
|
77 <tr><td>None</td></tr> |
|
78 </table> |
|
79 <h3>Class Methods</h3> |
|
80 |
|
81 <table> |
|
82 <tr><td>None</td></tr> |
|
83 </table> |
|
84 <h3>Methods</h3> |
|
85 |
|
86 <table> |
|
87 |
|
88 <tr> |
|
89 <td><a href="#TabnannyPlugin.__init__">TabnannyPlugin</a></td> |
|
90 <td>Constructor</td> |
|
91 </tr> |
|
92 <tr> |
|
93 <td><a href="#TabnannyPlugin.__editorClosed">__editorClosed</a></td> |
|
94 <td>Private slot called, when an editor was closed.</td> |
|
95 </tr> |
|
96 <tr> |
|
97 <td><a href="#TabnannyPlugin.__editorOpened">__editorOpened</a></td> |
|
98 <td>Private slot called, when a new editor was opened.</td> |
|
99 </tr> |
|
100 <tr> |
|
101 <td><a href="#TabnannyPlugin.__editorShowMenu">__editorShowMenu</a></td> |
|
102 <td>Private slot called, when the the editor context menu or a submenu is about to be shown.</td> |
|
103 </tr> |
|
104 <tr> |
|
105 <td><a href="#TabnannyPlugin.__editorTabnanny">__editorTabnanny</a></td> |
|
106 <td>Private slot to handle the tabnanny context menu action of the editors.</td> |
|
107 </tr> |
|
108 <tr> |
|
109 <td><a href="#TabnannyPlugin.__initialize">__initialize</a></td> |
|
110 <td>Private slot to (re)initialize the plugin.</td> |
|
111 </tr> |
|
112 <tr> |
|
113 <td><a href="#TabnannyPlugin.__projectBrowserShowMenu">__projectBrowserShowMenu</a></td> |
|
114 <td>Private slot called, when the the project browser context menu or a submenu is about to be shown.</td> |
|
115 </tr> |
|
116 <tr> |
|
117 <td><a href="#TabnannyPlugin.__projectBrowserTabnanny">__projectBrowserTabnanny</a></td> |
|
118 <td>Private method to handle the tabnanny context menu action of the project sources browser.</td> |
|
119 </tr> |
|
120 <tr> |
|
121 <td><a href="#TabnannyPlugin.__projectShowMenu">__projectShowMenu</a></td> |
|
122 <td>Private slot called, when the the project menu or a submenu is about to be shown.</td> |
|
123 </tr> |
|
124 <tr> |
|
125 <td><a href="#TabnannyPlugin.__projectTabnanny">__projectTabnanny</a></td> |
|
126 <td>Private slot used to check the project files for bad indentations.</td> |
|
127 </tr> |
|
128 <tr> |
|
129 <td><a href="#TabnannyPlugin.__serviceError">__serviceError</a></td> |
|
130 <td>Private slot handling service errors.</td> |
|
131 </tr> |
|
132 <tr> |
|
133 <td><a href="#TabnannyPlugin.activate">activate</a></td> |
|
134 <td>Public method to activate this plugin.</td> |
|
135 </tr> |
|
136 <tr> |
|
137 <td><a href="#TabnannyPlugin.batchJobDone">batchJobDone</a></td> |
|
138 <td>Public slot handling the completion of a batch job.</td> |
|
139 </tr> |
|
140 <tr> |
|
141 <td><a href="#TabnannyPlugin.cancelIndentBatchCheck">cancelIndentBatchCheck</a></td> |
|
142 <td>Public method to cancel all batch jobs.</td> |
|
143 </tr> |
|
144 <tr> |
|
145 <td><a href="#TabnannyPlugin.deactivate">deactivate</a></td> |
|
146 <td>Public method to deactivate this plugin.</td> |
|
147 </tr> |
|
148 <tr> |
|
149 <td><a href="#TabnannyPlugin.indentBatchCheck">indentBatchCheck</a></td> |
|
150 <td>Public method to prepare an indentation check on multiple Python source files.</td> |
|
151 </tr> |
|
152 <tr> |
|
153 <td><a href="#TabnannyPlugin.indentCheck">indentCheck</a></td> |
|
154 <td>Public method to prepare an indentation check on one Python source file.</td> |
|
155 </tr> |
|
156 <tr> |
|
157 <td><a href="#TabnannyPlugin.serviceErrorPy3">serviceErrorPy3</a></td> |
|
158 <td>Public slot handling service errors for Python 3.</td> |
|
159 </tr> |
|
160 </table> |
|
161 <h3>Static Methods</h3> |
|
162 |
|
163 <table> |
|
164 <tr><td>None</td></tr> |
|
165 </table> |
|
166 |
|
167 <a NAME="TabnannyPlugin.__init__" ID="TabnannyPlugin.__init__"></a> |
|
168 <h4>TabnannyPlugin (Constructor)</h4> |
|
169 <b>TabnannyPlugin</b>(<i>ui</i>) |
|
170 |
|
171 <p> |
|
172 Constructor |
|
173 </p> |
|
174 <dl> |
|
175 |
|
176 <dt><i>ui</i></dt> |
|
177 <dd> |
|
178 reference to the user interface object (UI.UserInterface) |
|
179 </dd> |
|
180 </dl> |
|
181 <a NAME="TabnannyPlugin.__editorClosed" ID="TabnannyPlugin.__editorClosed"></a> |
|
182 <h4>TabnannyPlugin.__editorClosed</h4> |
|
183 <b>__editorClosed</b>(<i>editor</i>) |
|
184 |
|
185 <p> |
|
186 Private slot called, when an editor was closed. |
|
187 </p> |
|
188 <dl> |
|
189 |
|
190 <dt><i>editor</i></dt> |
|
191 <dd> |
|
192 reference to the editor (QScintilla.Editor) |
|
193 </dd> |
|
194 </dl> |
|
195 <a NAME="TabnannyPlugin.__editorOpened" ID="TabnannyPlugin.__editorOpened"></a> |
|
196 <h4>TabnannyPlugin.__editorOpened</h4> |
|
197 <b>__editorOpened</b>(<i>editor</i>) |
|
198 |
|
199 <p> |
|
200 Private slot called, when a new editor was opened. |
|
201 </p> |
|
202 <dl> |
|
203 |
|
204 <dt><i>editor</i></dt> |
|
205 <dd> |
|
206 reference to the new editor (QScintilla.Editor) |
|
207 </dd> |
|
208 </dl> |
|
209 <a NAME="TabnannyPlugin.__editorShowMenu" ID="TabnannyPlugin.__editorShowMenu"></a> |
|
210 <h4>TabnannyPlugin.__editorShowMenu</h4> |
|
211 <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>) |
|
212 |
|
213 <p> |
|
214 Private slot called, when the the editor context menu or a submenu is |
|
215 about to be shown. |
|
216 </p> |
|
217 <dl> |
|
218 |
|
219 <dt><i>menuName</i></dt> |
|
220 <dd> |
|
221 name of the menu to be shown (string) |
|
222 </dd> |
|
223 <dt><i>menu</i></dt> |
|
224 <dd> |
|
225 reference to the menu (QMenu) |
|
226 </dd> |
|
227 <dt><i>editor</i></dt> |
|
228 <dd> |
|
229 reference to the editor |
|
230 </dd> |
|
231 </dl> |
|
232 <a NAME="TabnannyPlugin.__editorTabnanny" ID="TabnannyPlugin.__editorTabnanny"></a> |
|
233 <h4>TabnannyPlugin.__editorTabnanny</h4> |
|
234 <b>__editorTabnanny</b>(<i></i>) |
|
235 |
|
236 <p> |
|
237 Private slot to handle the tabnanny context menu action of the editors. |
|
238 </p> |
|
239 <a NAME="TabnannyPlugin.__initialize" ID="TabnannyPlugin.__initialize"></a> |
|
240 <h4>TabnannyPlugin.__initialize</h4> |
|
241 <b>__initialize</b>(<i></i>) |
|
242 |
|
243 <p> |
|
244 Private slot to (re)initialize the plugin. |
|
245 </p> |
|
246 <a NAME="TabnannyPlugin.__projectBrowserShowMenu" ID="TabnannyPlugin.__projectBrowserShowMenu"></a> |
|
247 <h4>TabnannyPlugin.__projectBrowserShowMenu</h4> |
|
248 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>) |
|
249 |
|
250 <p> |
|
251 Private slot called, when the the project browser context menu or a |
|
252 submenu is about to be shown. |
|
253 </p> |
|
254 <dl> |
|
255 |
|
256 <dt><i>menuName</i></dt> |
|
257 <dd> |
|
258 name of the menu to be shown (string) |
|
259 </dd> |
|
260 <dt><i>menu</i></dt> |
|
261 <dd> |
|
262 reference to the menu (QMenu) |
|
263 </dd> |
|
264 </dl> |
|
265 <a NAME="TabnannyPlugin.__projectBrowserTabnanny" ID="TabnannyPlugin.__projectBrowserTabnanny"></a> |
|
266 <h4>TabnannyPlugin.__projectBrowserTabnanny</h4> |
|
267 <b>__projectBrowserTabnanny</b>(<i></i>) |
|
268 |
|
269 <p> |
|
270 Private method to handle the tabnanny context menu action of the |
|
271 project sources browser. |
|
272 </p> |
|
273 <a NAME="TabnannyPlugin.__projectShowMenu" ID="TabnannyPlugin.__projectShowMenu"></a> |
|
274 <h4>TabnannyPlugin.__projectShowMenu</h4> |
|
275 <b>__projectShowMenu</b>(<i>menuName, menu</i>) |
|
276 |
|
277 <p> |
|
278 Private slot called, when the the project menu or a submenu is |
|
279 about to be shown. |
|
280 </p> |
|
281 <dl> |
|
282 |
|
283 <dt><i>menuName</i></dt> |
|
284 <dd> |
|
285 name of the menu to be shown (string) |
|
286 </dd> |
|
287 <dt><i>menu</i></dt> |
|
288 <dd> |
|
289 reference to the menu (QMenu) |
|
290 </dd> |
|
291 </dl> |
|
292 <a NAME="TabnannyPlugin.__projectTabnanny" ID="TabnannyPlugin.__projectTabnanny"></a> |
|
293 <h4>TabnannyPlugin.__projectTabnanny</h4> |
|
294 <b>__projectTabnanny</b>(<i></i>) |
|
295 |
|
296 <p> |
|
297 Private slot used to check the project files for bad indentations. |
|
298 </p> |
|
299 <a NAME="TabnannyPlugin.__serviceError" ID="TabnannyPlugin.__serviceError"></a> |
|
300 <h4>TabnannyPlugin.__serviceError</h4> |
|
301 <b>__serviceError</b>(<i>fn, msg</i>) |
|
302 |
|
303 <p> |
|
304 Private slot handling service errors. |
|
305 </p> |
|
306 <dl> |
|
307 |
|
308 <dt><i>fn</i></dt> |
|
309 <dd> |
|
310 file name (string) |
|
311 </dd> |
|
312 <dt><i>msg</i></dt> |
|
313 <dd> |
|
314 message text (string) |
|
315 </dd> |
|
316 </dl> |
|
317 <a NAME="TabnannyPlugin.activate" ID="TabnannyPlugin.activate"></a> |
|
318 <h4>TabnannyPlugin.activate</h4> |
|
319 <b>activate</b>(<i></i>) |
|
320 |
|
321 <p> |
|
322 Public method to activate this plugin. |
|
323 </p> |
|
324 <dl> |
|
325 <dt>Returns:</dt> |
|
326 <dd> |
|
327 tuple of None and activation status (boolean) |
|
328 </dd> |
|
329 </dl> |
|
330 <a NAME="TabnannyPlugin.batchJobDone" ID="TabnannyPlugin.batchJobDone"></a> |
|
331 <h4>TabnannyPlugin.batchJobDone</h4> |
|
332 <b>batchJobDone</b>(<i>fx, lang</i>) |
|
333 |
|
334 <p> |
|
335 Public slot handling the completion of a batch job. |
|
336 </p> |
|
337 <dl> |
|
338 |
|
339 <dt><i>fx</i></dt> |
|
340 <dd> |
|
341 service name (string) |
|
342 </dd> |
|
343 <dt><i>lang</i></dt> |
|
344 <dd> |
|
345 language (string) |
|
346 </dd> |
|
347 </dl> |
|
348 <a NAME="TabnannyPlugin.cancelIndentBatchCheck" ID="TabnannyPlugin.cancelIndentBatchCheck"></a> |
|
349 <h4>TabnannyPlugin.cancelIndentBatchCheck</h4> |
|
350 <b>cancelIndentBatchCheck</b>(<i></i>) |
|
351 |
|
352 <p> |
|
353 Public method to cancel all batch jobs. |
|
354 </p> |
|
355 <a NAME="TabnannyPlugin.deactivate" ID="TabnannyPlugin.deactivate"></a> |
|
356 <h4>TabnannyPlugin.deactivate</h4> |
|
357 <b>deactivate</b>(<i></i>) |
|
358 |
|
359 <p> |
|
360 Public method to deactivate this plugin. |
|
361 </p> |
|
362 <a NAME="TabnannyPlugin.indentBatchCheck" ID="TabnannyPlugin.indentBatchCheck"></a> |
|
363 <h4>TabnannyPlugin.indentBatchCheck</h4> |
|
364 <b>indentBatchCheck</b>(<i>argumentsList</i>) |
|
365 |
|
366 <p> |
|
367 Public method to prepare an indentation check on multiple Python |
|
368 source files. |
|
369 </p> |
|
370 <dl> |
|
371 |
|
372 <dt><i>argumentsList</i></dt> |
|
373 <dd> |
|
374 list of arguments tuples with each tuple |
|
375 containing filename and source (string, string) |
|
376 </dd> |
|
377 </dl> |
|
378 <a NAME="TabnannyPlugin.indentCheck" ID="TabnannyPlugin.indentCheck"></a> |
|
379 <h4>TabnannyPlugin.indentCheck</h4> |
|
380 <b>indentCheck</b>(<i>lang, filename, source</i>) |
|
381 |
|
382 <p> |
|
383 Public method to prepare an indentation check on one Python source |
|
384 file. |
|
385 </p> |
|
386 <dl> |
|
387 |
|
388 <dt><i>lang</i></dt> |
|
389 <dd> |
|
390 language of the file or None to determine by internal |
|
391 algorithm (str or None) |
|
392 </dd> |
|
393 <dt><i>filename</i></dt> |
|
394 <dd> |
|
395 source filename (string) |
|
396 </dd> |
|
397 <dt><i>source</i></dt> |
|
398 <dd> |
|
399 string containing the code to check (string) |
|
400 </dd> |
|
401 </dl> |
|
402 <a NAME="TabnannyPlugin.serviceErrorPy3" ID="TabnannyPlugin.serviceErrorPy3"></a> |
|
403 <h4>TabnannyPlugin.serviceErrorPy3</h4> |
|
404 <b>serviceErrorPy3</b>(<i>fx, lang, fn, msg</i>) |
|
405 |
|
406 <p> |
|
407 Public slot handling service errors for Python 3. |
|
408 </p> |
|
409 <dl> |
|
410 |
|
411 <dt><i>fx</i></dt> |
|
412 <dd> |
|
413 service name (string) |
|
414 </dd> |
|
415 <dt><i>lang</i></dt> |
|
416 <dd> |
|
417 language (string) |
|
418 </dd> |
|
419 <dt><i>fn</i></dt> |
|
420 <dd> |
|
421 file name (string) |
|
422 </dd> |
|
423 <dt><i>msg</i></dt> |
|
424 <dd> |
|
425 message text (string) |
|
426 </dd> |
|
427 </dl> |
|
428 <div align="right"><a href="#top">Up</a></div> |
|
429 <hr /> |
|
430 </body></html> |
|