eric6/Documentation/Source/eric6.Plugins.PluginSyntaxChecker.html

changeset 6942
2602857055c5
parent 4232
8349fd3f8802
child 7204
cbf6d88004ce
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Plugins.PluginSyntaxChecker</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><a NAME="top" ID="top"></a>
22 <h1>eric6.Plugins.PluginSyntaxChecker</h1>
23 <p>
24 Module implementing the Syntax Checker plugin.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <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>python2Compatible</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#SyntaxCheckerPlugin">SyntaxCheckerPlugin</a></td>
34 <td>Class implementing the Syntax Checker plugin.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="SyntaxCheckerPlugin" ID="SyntaxCheckerPlugin"></a>
43 <h2>SyntaxCheckerPlugin</h2>
44 <p>
45 Class implementing the Syntax Checker plugin.
46 </p>
47 <h3>Derived from</h3>
48 QObject
49 <h3>Class Attributes</h3>
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Class Methods</h3>
54 <table>
55 <tr><td>None</td></tr>
56 </table>
57 <h3>Methods</h3>
58 <table>
59 <tr>
60 <td><a href="#SyntaxCheckerPlugin.__init__">SyntaxCheckerPlugin</a></td>
61 <td>Constructor</td>
62 </tr><tr>
63 <td><a href="#SyntaxCheckerPlugin.__editorClosed">__editorClosed</a></td>
64 <td>Private slot called, when an editor was closed.</td>
65 </tr><tr>
66 <td><a href="#SyntaxCheckerPlugin.__editorOpened">__editorOpened</a></td>
67 <td>Private slot called, when a new editor was opened.</td>
68 </tr><tr>
69 <td><a href="#SyntaxCheckerPlugin.__editorShowMenu">__editorShowMenu</a></td>
70 <td>Private slot called, when the the editor context menu or a submenu is about to be shown.</td>
71 </tr><tr>
72 <td><a href="#SyntaxCheckerPlugin.__editorSyntaxCheck">__editorSyntaxCheck</a></td>
73 <td>Private slot to handle the syntax check context menu action of the editors.</td>
74 </tr><tr>
75 <td><a href="#SyntaxCheckerPlugin.__getPythonOptions">__getPythonOptions</a></td>
76 <td>Private methode to determine the syntax check options.</td>
77 </tr><tr>
78 <td><a href="#SyntaxCheckerPlugin.__initialize">__initialize</a></td>
79 <td>Private slot to (re)initialize the plugin.</td>
80 </tr><tr>
81 <td><a href="#SyntaxCheckerPlugin.__projectBrowserShowMenu">__projectBrowserShowMenu</a></td>
82 <td>Private slot called, when the the project browser menu or a submenu is about to be shown.</td>
83 </tr><tr>
84 <td><a href="#SyntaxCheckerPlugin.__projectBrowserSyntaxCheck">__projectBrowserSyntaxCheck</a></td>
85 <td>Private method to handle the syntax check context menu action of the project sources browser.</td>
86 </tr><tr>
87 <td><a href="#SyntaxCheckerPlugin.__projectShowMenu">__projectShowMenu</a></td>
88 <td>Private slot called, when the the project menu or a submenu is about to be shown.</td>
89 </tr><tr>
90 <td><a href="#SyntaxCheckerPlugin.__projectSyntaxCheck">__projectSyntaxCheck</a></td>
91 <td>Private slot used to check the project files for syntax errors.</td>
92 </tr><tr>
93 <td><a href="#SyntaxCheckerPlugin.__translateSyntaxCheck">__translateSyntaxCheck</a></td>
94 <td>Private slot to translate the resulting messages.</td>
95 </tr><tr>
96 <td><a href="#SyntaxCheckerPlugin.activate">activate</a></td>
97 <td>Public method to activate this plugin.</td>
98 </tr><tr>
99 <td><a href="#SyntaxCheckerPlugin.deactivate">deactivate</a></td>
100 <td>Public method to deactivate this plugin.</td>
101 </tr>
102 </table>
103 <h3>Static Methods</h3>
104 <table>
105 <tr><td>None</td></tr>
106 </table>
107 <a NAME="SyntaxCheckerPlugin.__init__" ID="SyntaxCheckerPlugin.__init__"></a>
108 <h4>SyntaxCheckerPlugin (Constructor)</h4>
109 <b>SyntaxCheckerPlugin</b>(<i>ui</i>)
110 <p>
111 Constructor
112 </p><dl>
113 <dt><i>ui</i></dt>
114 <dd>
115 reference to the user interface object (UI.UserInterface)
116 </dd>
117 </dl><a NAME="SyntaxCheckerPlugin.__editorClosed" ID="SyntaxCheckerPlugin.__editorClosed"></a>
118 <h4>SyntaxCheckerPlugin.__editorClosed</h4>
119 <b>__editorClosed</b>(<i>editor</i>)
120 <p>
121 Private slot called, when an editor was closed.
122 </p><dl>
123 <dt><i>editor</i></dt>
124 <dd>
125 reference to the editor (QScintilla.Editor)
126 </dd>
127 </dl><a NAME="SyntaxCheckerPlugin.__editorOpened" ID="SyntaxCheckerPlugin.__editorOpened"></a>
128 <h4>SyntaxCheckerPlugin.__editorOpened</h4>
129 <b>__editorOpened</b>(<i>editor</i>)
130 <p>
131 Private slot called, when a new editor was opened.
132 </p><dl>
133 <dt><i>editor</i></dt>
134 <dd>
135 reference to the new editor (QScintilla.Editor)
136 </dd>
137 </dl><a NAME="SyntaxCheckerPlugin.__editorShowMenu" ID="SyntaxCheckerPlugin.__editorShowMenu"></a>
138 <h4>SyntaxCheckerPlugin.__editorShowMenu</h4>
139 <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>)
140 <p>
141 Private slot called, when the the editor context menu or a submenu is
142 about to be shown.
143 </p><dl>
144 <dt><i>menuName</i></dt>
145 <dd>
146 name of the menu to be shown (string)
147 </dd><dt><i>menu</i></dt>
148 <dd>
149 reference to the menu (QMenu)
150 </dd><dt><i>editor</i></dt>
151 <dd>
152 reference to the editor
153 </dd>
154 </dl><a NAME="SyntaxCheckerPlugin.__editorSyntaxCheck" ID="SyntaxCheckerPlugin.__editorSyntaxCheck"></a>
155 <h4>SyntaxCheckerPlugin.__editorSyntaxCheck</h4>
156 <b>__editorSyntaxCheck</b>(<i></i>)
157 <p>
158 Private slot to handle the syntax check context menu action of the
159 editors.
160 </p><a NAME="SyntaxCheckerPlugin.__getPythonOptions" ID="SyntaxCheckerPlugin.__getPythonOptions"></a>
161 <h4>SyntaxCheckerPlugin.__getPythonOptions</h4>
162 <b>__getPythonOptions</b>(<i></i>)
163 <p>
164 Private methode to determine the syntax check options.
165 </p><dl>
166 <dt>Returns:</dt>
167 <dd>
168 state of checkFlakes and ignoreStarImportWarnings (bool, bool)
169 </dd>
170 </dl><a NAME="SyntaxCheckerPlugin.__initialize" ID="SyntaxCheckerPlugin.__initialize"></a>
171 <h4>SyntaxCheckerPlugin.__initialize</h4>
172 <b>__initialize</b>(<i></i>)
173 <p>
174 Private slot to (re)initialize the plugin.
175 </p><a NAME="SyntaxCheckerPlugin.__projectBrowserShowMenu" ID="SyntaxCheckerPlugin.__projectBrowserShowMenu"></a>
176 <h4>SyntaxCheckerPlugin.__projectBrowserShowMenu</h4>
177 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>)
178 <p>
179 Private slot called, when the the project browser menu or a submenu is
180 about to be shown.
181 </p><dl>
182 <dt><i>menuName</i></dt>
183 <dd>
184 name of the menu to be shown (string)
185 </dd><dt><i>menu</i></dt>
186 <dd>
187 reference to the menu (QMenu)
188 </dd>
189 </dl><a NAME="SyntaxCheckerPlugin.__projectBrowserSyntaxCheck" ID="SyntaxCheckerPlugin.__projectBrowserSyntaxCheck"></a>
190 <h4>SyntaxCheckerPlugin.__projectBrowserSyntaxCheck</h4>
191 <b>__projectBrowserSyntaxCheck</b>(<i></i>)
192 <p>
193 Private method to handle the syntax check context menu action of the
194 project sources browser.
195 </p><a NAME="SyntaxCheckerPlugin.__projectShowMenu" ID="SyntaxCheckerPlugin.__projectShowMenu"></a>
196 <h4>SyntaxCheckerPlugin.__projectShowMenu</h4>
197 <b>__projectShowMenu</b>(<i>menuName, menu</i>)
198 <p>
199 Private slot called, when the the project menu or a submenu is
200 about to be shown.
201 </p><dl>
202 <dt><i>menuName</i></dt>
203 <dd>
204 name of the menu to be shown (string)
205 </dd><dt><i>menu</i></dt>
206 <dd>
207 reference to the menu (QMenu)
208 </dd>
209 </dl><a NAME="SyntaxCheckerPlugin.__projectSyntaxCheck" ID="SyntaxCheckerPlugin.__projectSyntaxCheck"></a>
210 <h4>SyntaxCheckerPlugin.__projectSyntaxCheck</h4>
211 <b>__projectSyntaxCheck</b>(<i></i>)
212 <p>
213 Private slot used to check the project files for syntax errors.
214 </p><a NAME="SyntaxCheckerPlugin.__translateSyntaxCheck" ID="SyntaxCheckerPlugin.__translateSyntaxCheck"></a>
215 <h4>SyntaxCheckerPlugin.__translateSyntaxCheck</h4>
216 <b>__translateSyntaxCheck</b>(<i>fn, problems</i>)
217 <p>
218 Private slot to translate the resulting messages.
219 </p><p>
220 If checkFlakes is True, warnings contains a list of strings containing
221 the warnings (marker, file name, line number, message)
222 The values are only valid, if nok is False.
223 </p><dl>
224 <dt><i>fn</i></dt>
225 <dd>
226 filename of the checked file (str)
227 </dd><dt><i>problems</i></dt>
228 <dd>
229 dictionary with the keys 'error' and 'warnings' which
230 hold a list containing details about the error/ warnings
231 (file name, line number, column, codestring (only at syntax
232 errors), the message, a list with arguments for the message)
233 </dd>
234 </dl><a NAME="SyntaxCheckerPlugin.activate" ID="SyntaxCheckerPlugin.activate"></a>
235 <h4>SyntaxCheckerPlugin.activate</h4>
236 <b>activate</b>(<i></i>)
237 <p>
238 Public method to activate this plugin.
239 </p><dl>
240 <dt>Returns:</dt>
241 <dd>
242 tuple of None and activation status (boolean)
243 </dd>
244 </dl><a NAME="SyntaxCheckerPlugin.deactivate" ID="SyntaxCheckerPlugin.deactivate"></a>
245 <h4>SyntaxCheckerPlugin.deactivate</h4>
246 <b>deactivate</b>(<i></i>)
247 <p>
248 Public method to deactivate this plugin.
249 </p>
250 <div align="right"><a href="#top">Up</a></div>
251 <hr />
252 </body></html>

eric ide

mercurial