45 <tr> |
45 <tr> |
46 <td><a href="#getClassBrowserModule">getClassBrowserModule</a></td> |
46 <td><a href="#getClassBrowserModule">getClassBrowserModule</a></td> |
47 <td>Function to import a class browser module.</td> |
47 <td>Function to import a class browser module.</td> |
48 </tr> |
48 </tr> |
49 <tr> |
49 <tr> |
|
50 <td><a href="#getIcon">getIcon</a></td> |
|
51 <td>Function to get an icon name for the given file (only for class browsers provided via plugins).</td> |
|
52 </tr> |
|
53 <tr> |
|
54 <td><a href="#isSupportedType">isSupportedType</a></td> |
|
55 <td>Function to check, if the given file extension indicates a supported file type.</td> |
|
56 </tr> |
|
57 <tr> |
50 <td><a href="#readmodule">readmodule</a></td> |
58 <td><a href="#readmodule">readmodule</a></td> |
51 <td>Function to read a source file and return a dictionary of classes, functions, modules, etc.</td> |
59 <td>Function to read a source file and return a dictionary of classes, functions, modules, etc.</td> |
|
60 </tr> |
|
61 <tr> |
|
62 <td><a href="#registerClassBrowser">registerClassBrowser</a></td> |
|
63 <td>Function to register a class browser type.</td> |
|
64 </tr> |
|
65 <tr> |
|
66 <td><a href="#scan">scan</a></td> |
|
67 <td>Function to scan the given source text.</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#unregisterClassBrowser">unregisterClassBrowser</a></td> |
|
71 <td>Function to unregister a class browser type.</td> |
52 </tr> |
72 </tr> |
53 </table> |
73 </table> |
54 <hr /> |
74 <hr /> |
55 <hr /> |
75 <hr /> |
56 <a NAME="find_module" ID="find_module"></a> |
76 <a NAME="find_module" ID="find_module"></a> |
131 </dd> |
151 </dd> |
132 </dl> |
152 </dl> |
133 <div align="right"><a href="#top">Up</a></div> |
153 <div align="right"><a href="#top">Up</a></div> |
134 <hr /> |
154 <hr /> |
135 <hr /> |
155 <hr /> |
|
156 <a NAME="getIcon" ID="getIcon"></a> |
|
157 <h2>getIcon</h2> |
|
158 <b>getIcon</b>(<i>filename</i>) |
|
159 |
|
160 <p> |
|
161 Function to get an icon name for the given file (only for class browsers provided |
|
162 via plugins). |
|
163 </p> |
|
164 <dl> |
|
165 |
|
166 <dt><i>filename</i> (str)</dt> |
|
167 <dd> |
|
168 name of the file |
|
169 </dd> |
|
170 </dl> |
|
171 <dl> |
|
172 <dt>Return:</dt> |
|
173 <dd> |
|
174 icon name |
|
175 </dd> |
|
176 </dl> |
|
177 <dl> |
|
178 <dt>Return Type:</dt> |
|
179 <dd> |
|
180 str |
|
181 </dd> |
|
182 </dl> |
|
183 <div align="right"><a href="#top">Up</a></div> |
|
184 <hr /> |
|
185 <hr /> |
|
186 <a NAME="isSupportedType" ID="isSupportedType"></a> |
|
187 <h2>isSupportedType</h2> |
|
188 <b>isSupportedType</b>(<i>fileext</i>) |
|
189 |
|
190 <p> |
|
191 Function to check, if the given file extension indicates a supported file type. |
|
192 </p> |
|
193 <dl> |
|
194 |
|
195 <dt><i>fileext</i> (str)</dt> |
|
196 <dd> |
|
197 file extension |
|
198 </dd> |
|
199 </dl> |
|
200 <dl> |
|
201 <dt>Return:</dt> |
|
202 <dd> |
|
203 flag indicating a supported file type |
|
204 </dd> |
|
205 </dl> |
|
206 <dl> |
|
207 <dt>Return Type:</dt> |
|
208 <dd> |
|
209 bool |
|
210 </dd> |
|
211 </dl> |
|
212 <div align="right"><a href="#top">Up</a></div> |
|
213 <hr /> |
|
214 <hr /> |
136 <a NAME="readmodule" ID="readmodule"></a> |
215 <a NAME="readmodule" ID="readmodule"></a> |
137 <h2>readmodule</h2> |
216 <h2>readmodule</h2> |
138 <b>readmodule</b>(<i>module, path=None, isPyFile=False</i>) |
217 <b>readmodule</b>(<i>module, path=None, isPyFile=False</i>) |
139 |
218 |
140 <p> |
219 <p> |
172 dict |
251 dict |
173 </dd> |
252 </dd> |
174 </dl> |
253 </dl> |
175 <div align="right"><a href="#top">Up</a></div> |
254 <div align="right"><a href="#top">Up</a></div> |
176 <hr /> |
255 <hr /> |
|
256 <hr /> |
|
257 <a NAME="registerClassBrowser" ID="registerClassBrowser"></a> |
|
258 <h2>registerClassBrowser</h2> |
|
259 <b>registerClassBrowser</b>(<i>name, readModuleFunc, scanFunc, iconFunc, extensions</i>) |
|
260 |
|
261 <p> |
|
262 Function to register a class browser type. |
|
263 </p> |
|
264 <dl> |
|
265 |
|
266 <dt><i>name</i> (str)</dt> |
|
267 <dd> |
|
268 name of the class browser |
|
269 </dd> |
|
270 <dt><i>readModuleFunc</i> (function)</dt> |
|
271 <dd> |
|
272 function to read and parse a file returning a dictionary |
|
273 with the parsing result |
|
274 </dd> |
|
275 <dt><i>scanFunc</i> (function)</dt> |
|
276 <dd> |
|
277 function to scan a given source text returning a dictionary with |
|
278 the parsing result |
|
279 </dd> |
|
280 <dt><i>iconFunc</i> (function)</dt> |
|
281 <dd> |
|
282 function returning an icon name for the supported files |
|
283 </dd> |
|
284 <dt><i>extensions</i> (list of str)</dt> |
|
285 <dd> |
|
286 list of associated file extensions |
|
287 </dd> |
|
288 </dl> |
|
289 <dl> |
|
290 |
|
291 <dt>Raises <b>KeyError</b>:</dt> |
|
292 <dd> |
|
293 raised if the class browser to be registered is already |
|
294 </dd> |
|
295 </dl> |
|
296 <div align="right"><a href="#top">Up</a></div> |
|
297 <hr /> |
|
298 <hr /> |
|
299 <a NAME="scan" ID="scan"></a> |
|
300 <h2>scan</h2> |
|
301 <b>scan</b>(<i>src, filename, module, isPyFile=False</i>) |
|
302 |
|
303 <p> |
|
304 Function to scan the given source text. |
|
305 </p> |
|
306 <dl> |
|
307 |
|
308 <dt><i>src</i> (str)</dt> |
|
309 <dd> |
|
310 source text to be scanned |
|
311 </dd> |
|
312 <dt><i>filename</i> (str)</dt> |
|
313 <dd> |
|
314 file name associated with the source text |
|
315 </dd> |
|
316 <dt><i>module</i> (str)</dt> |
|
317 <dd> |
|
318 module name associated with the source text |
|
319 </dd> |
|
320 <dt><i>isPyFile</i> (bool)</dt> |
|
321 <dd> |
|
322 flag indicating a Python file |
|
323 </dd> |
|
324 </dl> |
|
325 <dl> |
|
326 <dt>Return:</dt> |
|
327 <dd> |
|
328 dictionary containing the extracted data |
|
329 </dd> |
|
330 </dl> |
|
331 <dl> |
|
332 <dt>Return Type:</dt> |
|
333 <dd> |
|
334 dict |
|
335 </dd> |
|
336 </dl> |
|
337 <div align="right"><a href="#top">Up</a></div> |
|
338 <hr /> |
|
339 <hr /> |
|
340 <a NAME="unregisterClassBrowser" ID="unregisterClassBrowser"></a> |
|
341 <h2>unregisterClassBrowser</h2> |
|
342 <b>unregisterClassBrowser</b>(<i>name</i>) |
|
343 |
|
344 <p> |
|
345 Function to unregister a class browser type. |
|
346 </p> |
|
347 <dl> |
|
348 |
|
349 <dt><i>name</i> (str)</dt> |
|
350 <dd> |
|
351 name of the class browser |
|
352 </dd> |
|
353 </dl> |
|
354 <div align="right"><a href="#top">Up</a></div> |
|
355 <hr /> |
177 </body></html> |
356 </body></html> |