Documentation/Source/eric6.PluginManager.PluginManager.html

changeset 3673
e26d7d0c1088
child 4113
feac3108a780
equal deleted inserted replaced
3670:f0cb7579c0b4 3673:e26d7d0c1088
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.PluginManager.PluginManager</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.PluginManager.PluginManager</h1>
23 <p>
24 Module implementing the Plugin Manager.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#PluginManager">PluginManager</a></td>
34 <td>Class implementing the Plugin Manager.</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="PluginManager" ID="PluginManager"></a>
43 <h2>PluginManager</h2>
44 <p>
45 Class implementing the Plugin Manager.
46 </p><h3>Signals</h3>
47 <dl>
48 <dt>allPlugginsActivated()</dt>
49 <dd>
50 emitted at startup after all plugins have
51 been activated
52 </dd><dt>pluginAboutToBeActivated(modulName, pluginObject)</dt>
53 <dd>
54 emitted just
55 before a plugin is activated
56 </dd><dt>pluginAboutToBeDeactivated(moduleName, pluginObject)</dt>
57 <dd>
58 emitted just
59 before a plugin is deactivated
60 </dd><dt>pluginActivated(moduleName, pluginObject)</dt>
61 <dd>
62 emitted just after
63 a plugin was activated
64 </dd><dt>pluginDeactivated(moduleName, pluginObject)</dt>
65 <dd>
66 emitted just after
67 a plugin was deactivated
68 </dd><dt>shutdown()</dt>
69 <dd>
70 emitted at shutdown of the IDE
71 </dd>
72 </dl>
73 <h3>Derived from</h3>
74 QObject
75 <h3>Class Attributes</h3>
76 <table>
77 <tr><td>None</td></tr>
78 </table>
79 <h3>Class Methods</h3>
80 <table>
81 <tr><td>None</td></tr>
82 </table>
83 <h3>Methods</h3>
84 <table>
85 <tr>
86 <td><a href="#PluginManager.__init__">PluginManager</a></td>
87 <td>Constructor</td>
88 </tr><tr>
89 <td><a href="#PluginManager.__canActivatePlugin">__canActivatePlugin</a></td>
90 <td>Private method to check, if a plugin can be activated.</td>
91 </tr><tr>
92 <td><a href="#PluginManager.__canDeactivatePlugin">__canDeactivatePlugin</a></td>
93 <td>Private method to check, if a plugin can be deactivated.</td>
94 </tr><tr>
95 <td><a href="#PluginManager.__checkPluginsDownloadDirectory">__checkPluginsDownloadDirectory</a></td>
96 <td>Private slot to check for the existence of the plugins download directory.</td>
97 </tr><tr>
98 <td><a href="#PluginManager.__downloadRepositoryFileDone">__downloadRepositoryFileDone</a></td>
99 <td>Private method called after the repository file was downloaded.</td>
100 </tr><tr>
101 <td><a href="#PluginManager.__getShortInfo">__getShortInfo</a></td>
102 <td>Private method to extract the short info from a module.</td>
103 </tr><tr>
104 <td><a href="#PluginManager.__insertPluginsPaths">__insertPluginsPaths</a></td>
105 <td>Private method to insert the valid plugin paths intos the search path.</td>
106 </tr><tr>
107 <td><a href="#PluginManager.__loadPlugins">__loadPlugins</a></td>
108 <td>Private method to load the plugins found.</td>
109 </tr><tr>
110 <td><a href="#PluginManager.__pluginDirectoriesExist">__pluginDirectoriesExist</a></td>
111 <td>Private method to check, if the plugin folders exist.</td>
112 </tr><tr>
113 <td><a href="#PluginManager.__pluginModulesExist">__pluginModulesExist</a></td>
114 <td>Private method to check, if there are plugins available.</td>
115 </tr><tr>
116 <td><a href="#PluginManager.__sslErrors">__sslErrors</a></td>
117 <td>Private slot to handle SSL errors.</td>
118 </tr><tr>
119 <td><a href="#PluginManager.activatePlugin">activatePlugin</a></td>
120 <td>Public method to activate a plugin.</td>
121 </tr><tr>
122 <td><a href="#PluginManager.activatePlugins">activatePlugins</a></td>
123 <td>Public method to activate all plugins having the "autoactivate" attribute set to True.</td>
124 </tr><tr>
125 <td><a href="#PluginManager.checkPluginEntry">checkPluginEntry</a></td>
126 <td>Public method to check a plug-in's data for an update.</td>
127 </tr><tr>
128 <td><a href="#PluginManager.checkPluginUpdatesAvailable">checkPluginUpdatesAvailable</a></td>
129 <td>Public method to check the availability of updates of plug-ins.</td>
130 </tr><tr>
131 <td><a href="#PluginManager.deactivatePlugin">deactivatePlugin</a></td>
132 <td>Public method to deactivate a plugin.</td>
133 </tr><tr>
134 <td><a href="#PluginManager.deactivateVcsPlugins">deactivateVcsPlugins</a></td>
135 <td>Public method to deactivated all activated VCS plugins.</td>
136 </tr><tr>
137 <td><a href="#PluginManager.doShutdown">doShutdown</a></td>
138 <td>Public method called to perform actions upon shutdown of the IDE.</td>
139 </tr><tr>
140 <td><a href="#PluginManager.finalizeSetup">finalizeSetup</a></td>
141 <td>Public method to finalize the setup of the plugin manager.</td>
142 </tr><tr>
143 <td><a href="#PluginManager.getPluginApiFiles">getPluginApiFiles</a></td>
144 <td>Public method to get the list of API files installed by a plugin.</td>
145 </tr><tr>
146 <td><a href="#PluginManager.getPluginConfigData">getPluginConfigData</a></td>
147 <td>Public method to get the config data of all active, non on-demand plugins used by the configuration dialog.</td>
148 </tr><tr>
149 <td><a href="#PluginManager.getPluginDetails">getPluginDetails</a></td>
150 <td>Public method to get detailed information about a plugin.</td>
151 </tr><tr>
152 <td><a href="#PluginManager.getPluginDir">getPluginDir</a></td>
153 <td>Public method to get the path of a plugin directory.</td>
154 </tr><tr>
155 <td><a href="#PluginManager.getPluginDisplayStrings">getPluginDisplayStrings</a></td>
156 <td>Public method to get the display strings of all plugins of a specific type.</td>
157 </tr><tr>
158 <td><a href="#PluginManager.getPluginExeDisplayData">getPluginExeDisplayData</a></td>
159 <td>Public method to get data to display information about a plugins external tool.</td>
160 </tr><tr>
161 <td><a href="#PluginManager.getPluginInfos">getPluginInfos</a></td>
162 <td>Public method to get infos about all loaded plugins.</td>
163 </tr><tr>
164 <td><a href="#PluginManager.getPluginModules">getPluginModules</a></td>
165 <td>Public method to get a list of plugin modules.</td>
166 </tr><tr>
167 <td><a href="#PluginManager.getPluginObject">getPluginObject</a></td>
168 <td>Public method to activate an ondemand plugin given by type and typename.</td>
169 </tr><tr>
170 <td><a href="#PluginManager.getPluginPreviewPixmap">getPluginPreviewPixmap</a></td>
171 <td>Public method to get a preview pixmap of a plugin of a specific type.</td>
172 </tr><tr>
173 <td><a href="#PluginManager.getVcsSystemIndicators">getVcsSystemIndicators</a></td>
174 <td>Public method to get the Vcs System indicators.</td>
175 </tr><tr>
176 <td><a href="#PluginManager.initOnDemandPlugin">initOnDemandPlugin</a></td>
177 <td>Public method to create a plugin object for the named on demand plugin.</td>
178 </tr><tr>
179 <td><a href="#PluginManager.initOnDemandPlugins">initOnDemandPlugins</a></td>
180 <td>Public method to create plugin objects for all on demand plugins.</td>
181 </tr><tr>
182 <td><a href="#PluginManager.isPluginActive">isPluginActive</a></td>
183 <td>Public method to check, if a certain plugin is active.</td>
184 </tr><tr>
185 <td><a href="#PluginManager.isPluginLoaded">isPluginLoaded</a></td>
186 <td>Public method to check, if a certain plugin is loaded.</td>
187 </tr><tr>
188 <td><a href="#PluginManager.isValidPluginName">isValidPluginName</a></td>
189 <td>Public methode to check, if a file name is a valid plugin name.</td>
190 </tr><tr>
191 <td><a href="#PluginManager.loadPlugin">loadPlugin</a></td>
192 <td>Public method to load a plugin module.</td>
193 </tr><tr>
194 <td><a href="#PluginManager.preferencesChanged">preferencesChanged</a></td>
195 <td>Public slot to react to changes in configuration.</td>
196 </tr><tr>
197 <td><a href="#PluginManager.removePluginFromSysModules">removePluginFromSysModules</a></td>
198 <td>Public method to remove a plugin and all related modules from sys.modules.</td>
199 </tr><tr>
200 <td><a href="#PluginManager.unloadPlugin">unloadPlugin</a></td>
201 <td>Public method to unload a plugin module.</td>
202 </tr>
203 </table>
204 <h3>Static Methods</h3>
205 <table>
206 <tr><td>None</td></tr>
207 </table>
208 <a NAME="PluginManager.__init__" ID="PluginManager.__init__"></a>
209 <h4>PluginManager (Constructor)</h4>
210 <b>PluginManager</b>(<i>parent=None, doLoadPlugins=True, develPlugin=None</i>)
211 <p>
212 Constructor
213 </p><p>
214 The Plugin Manager deals with three different plugin directories.
215 The first is the one, that is part of eric6 (eric6/Plugins). The
216 second one is the global plugin directory called 'eric6plugins',
217 which is located inside the site-packages directory. The last one
218 is the user plugin directory located inside the .eric6 directory
219 of the users home directory.
220 </p><dl>
221 <dt><i>parent</i></dt>
222 <dd>
223 reference to the parent object (QObject)
224 </dd><dt><i>doLoadPlugins=</i></dt>
225 <dd>
226 flag indicating, that plugins should
227 be loaded (boolean)
228 </dd><dt><i>develPlugin=</i></dt>
229 <dd>
230 filename of a plugin to be loaded for
231 development (string)
232 </dd>
233 </dl><dl>
234 <dt>Raises <b>PluginPathError</b>:</dt>
235 <dd>
236 raised to indicate an invalid plug-in path
237 </dd>
238 </dl><a NAME="PluginManager.__canActivatePlugin" ID="PluginManager.__canActivatePlugin"></a>
239 <h4>PluginManager.__canActivatePlugin</h4>
240 <b>__canActivatePlugin</b>(<i>module</i>)
241 <p>
242 Private method to check, if a plugin can be activated.
243 </p><dl>
244 <dt><i>module</i></dt>
245 <dd>
246 reference to the module to be activated
247 </dd>
248 </dl><dl>
249 <dt>Returns:</dt>
250 <dd>
251 flag indicating, if the module satisfies all requirements
252 for being activated (boolean)
253 </dd>
254 </dl><dl>
255 <dt>Raises <b>PluginClassFormatError</b>:</dt>
256 <dd>
257 raised to indicate an invalid
258 plug-in class format
259 </dd><dt>Raises <b>PluginModuleFormatError</b>:</dt>
260 <dd>
261 raised to indicate an invalid
262 plug-in module format
263 </dd>
264 </dl><a NAME="PluginManager.__canDeactivatePlugin" ID="PluginManager.__canDeactivatePlugin"></a>
265 <h4>PluginManager.__canDeactivatePlugin</h4>
266 <b>__canDeactivatePlugin</b>(<i>module</i>)
267 <p>
268 Private method to check, if a plugin can be deactivated.
269 </p><dl>
270 <dt><i>module</i></dt>
271 <dd>
272 reference to the module to be deactivated
273 </dd>
274 </dl><dl>
275 <dt>Returns:</dt>
276 <dd>
277 flag indicating, if the module satisfies all requirements
278 for being deactivated (boolean)
279 </dd>
280 </dl><a NAME="PluginManager.__checkPluginsDownloadDirectory" ID="PluginManager.__checkPluginsDownloadDirectory"></a>
281 <h4>PluginManager.__checkPluginsDownloadDirectory</h4>
282 <b>__checkPluginsDownloadDirectory</b>(<i></i>)
283 <p>
284 Private slot to check for the existence of the plugins download
285 directory.
286 </p><a NAME="PluginManager.__downloadRepositoryFileDone" ID="PluginManager.__downloadRepositoryFileDone"></a>
287 <h4>PluginManager.__downloadRepositoryFileDone</h4>
288 <b>__downloadRepositoryFileDone</b>(<i></i>)
289 <p>
290 Private method called after the repository file was downloaded.
291 </p><a NAME="PluginManager.__getShortInfo" ID="PluginManager.__getShortInfo"></a>
292 <h4>PluginManager.__getShortInfo</h4>
293 <b>__getShortInfo</b>(<i>module</i>)
294 <p>
295 Private method to extract the short info from a module.
296 </p><dl>
297 <dt><i>module</i></dt>
298 <dd>
299 module to extract short info from
300 </dd>
301 </dl><dl>
302 <dt>Returns:</dt>
303 <dd>
304 short info as a tuple giving plugin name (string),
305 short description (string), error flag (boolean) and
306 version (string)
307 </dd>
308 </dl><a NAME="PluginManager.__insertPluginsPaths" ID="PluginManager.__insertPluginsPaths"></a>
309 <h4>PluginManager.__insertPluginsPaths</h4>
310 <b>__insertPluginsPaths</b>(<i></i>)
311 <p>
312 Private method to insert the valid plugin paths intos the search path.
313 </p><a NAME="PluginManager.__loadPlugins" ID="PluginManager.__loadPlugins"></a>
314 <h4>PluginManager.__loadPlugins</h4>
315 <b>__loadPlugins</b>(<i></i>)
316 <p>
317 Private method to load the plugins found.
318 </p><a NAME="PluginManager.__pluginDirectoriesExist" ID="PluginManager.__pluginDirectoriesExist"></a>
319 <h4>PluginManager.__pluginDirectoriesExist</h4>
320 <b>__pluginDirectoriesExist</b>(<i></i>)
321 <p>
322 Private method to check, if the plugin folders exist.
323 </p><p>
324 If the plugin folders don't exist, they are created (if possible).
325 </p><dl>
326 <dt>Returns:</dt>
327 <dd>
328 tuple of a flag indicating existence of any of the plugin
329 directories (boolean) and a message (string)
330 </dd>
331 </dl><a NAME="PluginManager.__pluginModulesExist" ID="PluginManager.__pluginModulesExist"></a>
332 <h4>PluginManager.__pluginModulesExist</h4>
333 <b>__pluginModulesExist</b>(<i></i>)
334 <p>
335 Private method to check, if there are plugins available.
336 </p><dl>
337 <dt>Returns:</dt>
338 <dd>
339 flag indicating the availability of plugins (boolean)
340 </dd>
341 </dl><a NAME="PluginManager.__sslErrors" ID="PluginManager.__sslErrors"></a>
342 <h4>PluginManager.__sslErrors</h4>
343 <b>__sslErrors</b>(<i>reply, errors</i>)
344 <p>
345 Private slot to handle SSL errors.
346 </p><dl>
347 <dt><i>reply</i></dt>
348 <dd>
349 reference to the reply object (QNetworkReply)
350 </dd><dt><i>errors</i></dt>
351 <dd>
352 list of SSL errors (list of QSslError)
353 </dd>
354 </dl><a NAME="PluginManager.activatePlugin" ID="PluginManager.activatePlugin"></a>
355 <h4>PluginManager.activatePlugin</h4>
356 <b>activatePlugin</b>(<i>name, onDemand=False</i>)
357 <p>
358 Public method to activate a plugin.
359 </p><dl>
360 <dt><i>name</i></dt>
361 <dd>
362 name of the module to be activated
363 </dd><dt><i>onDemand=</i></dt>
364 <dd>
365 flag indicating activation of an
366 on demand plugin (boolean)
367 </dd>
368 </dl><dl>
369 <dt>Returns:</dt>
370 <dd>
371 reference to the initialized plugin object
372 </dd>
373 </dl><dl>
374 <dt>Raises <b>PluginActivationError</b>:</dt>
375 <dd>
376 raised to indicate an issue during the
377 plug-in activation
378 </dd>
379 </dl><a NAME="PluginManager.activatePlugins" ID="PluginManager.activatePlugins"></a>
380 <h4>PluginManager.activatePlugins</h4>
381 <b>activatePlugins</b>(<i></i>)
382 <p>
383 Public method to activate all plugins having the "autoactivate"
384 attribute set to True.
385 </p><a NAME="PluginManager.checkPluginEntry" ID="PluginManager.checkPluginEntry"></a>
386 <h4>PluginManager.checkPluginEntry</h4>
387 <b>checkPluginEntry</b>(<i>name, short, description, url, author, version, filename, status</i>)
388 <p>
389 Public method to check a plug-in's data for an update.
390 </p><dl>
391 <dt><i>name</i></dt>
392 <dd>
393 data for the name field (string)
394 </dd><dt><i>short</i></dt>
395 <dd>
396 data for the short field (string)
397 </dd><dt><i>description</i></dt>
398 <dd>
399 data for the description field (list of strings)
400 </dd><dt><i>url</i></dt>
401 <dd>
402 data for the url field (string)
403 </dd><dt><i>author</i></dt>
404 <dd>
405 data for the author field (string)
406 </dd><dt><i>version</i></dt>
407 <dd>
408 data for the version field (string)
409 </dd><dt><i>filename</i></dt>
410 <dd>
411 data for the filename field (string)
412 </dd><dt><i>status</i></dt>
413 <dd>
414 status of the plugin (string [stable, unstable, unknown])
415 </dd>
416 </dl><a NAME="PluginManager.checkPluginUpdatesAvailable" ID="PluginManager.checkPluginUpdatesAvailable"></a>
417 <h4>PluginManager.checkPluginUpdatesAvailable</h4>
418 <b>checkPluginUpdatesAvailable</b>(<i></i>)
419 <p>
420 Public method to check the availability of updates of plug-ins.
421 </p><a NAME="PluginManager.deactivatePlugin" ID="PluginManager.deactivatePlugin"></a>
422 <h4>PluginManager.deactivatePlugin</h4>
423 <b>deactivatePlugin</b>(<i>name, onDemand=False</i>)
424 <p>
425 Public method to deactivate a plugin.
426 </p><dl>
427 <dt><i>name</i></dt>
428 <dd>
429 name of the module to be deactivated
430 </dd><dt><i>onDemand=</i></dt>
431 <dd>
432 flag indicating deactivation of an
433 on demand plugin (boolean)
434 </dd>
435 </dl><a NAME="PluginManager.deactivateVcsPlugins" ID="PluginManager.deactivateVcsPlugins"></a>
436 <h4>PluginManager.deactivateVcsPlugins</h4>
437 <b>deactivateVcsPlugins</b>(<i></i>)
438 <p>
439 Public method to deactivated all activated VCS plugins.
440 </p><a NAME="PluginManager.doShutdown" ID="PluginManager.doShutdown"></a>
441 <h4>PluginManager.doShutdown</h4>
442 <b>doShutdown</b>(<i></i>)
443 <p>
444 Public method called to perform actions upon shutdown of the IDE.
445 </p><a NAME="PluginManager.finalizeSetup" ID="PluginManager.finalizeSetup"></a>
446 <h4>PluginManager.finalizeSetup</h4>
447 <b>finalizeSetup</b>(<i></i>)
448 <p>
449 Public method to finalize the setup of the plugin manager.
450 </p><a NAME="PluginManager.getPluginApiFiles" ID="PluginManager.getPluginApiFiles"></a>
451 <h4>PluginManager.getPluginApiFiles</h4>
452 <b>getPluginApiFiles</b>(<i>language</i>)
453 <p>
454 Public method to get the list of API files installed by a plugin.
455 </p><dl>
456 <dt><i>language</i></dt>
457 <dd>
458 language of the requested API files (string)
459 </dd>
460 </dl><dl>
461 <dt>Returns:</dt>
462 <dd>
463 list of API filenames (list of string)
464 </dd>
465 </dl><a NAME="PluginManager.getPluginConfigData" ID="PluginManager.getPluginConfigData"></a>
466 <h4>PluginManager.getPluginConfigData</h4>
467 <b>getPluginConfigData</b>(<i></i>)
468 <p>
469 Public method to get the config data of all active, non on-demand
470 plugins used by the configuration dialog.
471 </p><p>
472 Plugins supporting this functionality must provide the plugin module
473 function 'getConfigData' returning a dictionary with unique keys
474 of lists with the following list contents:
475 <dl>
476 <dt>display string</dt>
477 <dd>string shown in the selection area of the configuration page.
478 This should be a localized string</dd>
479 <dt>pixmap name</dt>
480 <dd>filename of the pixmap to be shown next to the display
481 string</dd>
482 <dt>page creation function</dt>
483 <dd>plugin module function to be called to create the configuration
484 page. The page must be subclasses from
485 Preferences.ConfigurationPages.ConfigurationPageBase and must
486 implement a method called 'save' to save the settings. A parent
487 entry will be created in the selection list, if this value is
488 None.</dd>
489 <dt>parent key</dt>
490 <dd>dictionary key of the parent entry or None, if this defines a
491 toplevel entry.</dd>
492 <dt>reference to configuration page</dt>
493 <dd>This will be used by the configuration dialog and must always
494 be None</dd>
495 </dl>
496 </p><dl>
497 <dt>Returns:</dt>
498 <dd>
499 plug-in configuration data
500 </dd>
501 </dl><a NAME="PluginManager.getPluginDetails" ID="PluginManager.getPluginDetails"></a>
502 <h4>PluginManager.getPluginDetails</h4>
503 <b>getPluginDetails</b>(<i>name</i>)
504 <p>
505 Public method to get detailed information about a plugin.
506 </p><dl>
507 <dt><i>name</i></dt>
508 <dd>
509 name of the module to get detailed infos about (string)
510 </dd>
511 </dl><dl>
512 <dt>Returns:</dt>
513 <dd>
514 details of the plugin as a dictionary
515 </dd>
516 </dl><a NAME="PluginManager.getPluginDir" ID="PluginManager.getPluginDir"></a>
517 <h4>PluginManager.getPluginDir</h4>
518 <b>getPluginDir</b>(<i>key</i>)
519 <p>
520 Public method to get the path of a plugin directory.
521 </p><dl>
522 <dt><i>key</i></dt>
523 <dd>
524 key of the plug-in directory (string)
525 </dd>
526 </dl><dl>
527 <dt>Returns:</dt>
528 <dd>
529 path of the requested plugin directory (string)
530 </dd>
531 </dl><a NAME="PluginManager.getPluginDisplayStrings" ID="PluginManager.getPluginDisplayStrings"></a>
532 <h4>PluginManager.getPluginDisplayStrings</h4>
533 <b>getPluginDisplayStrings</b>(<i>type_</i>)
534 <p>
535 Public method to get the display strings of all plugins of a specific
536 type.
537 </p><dl>
538 <dt><i>type_</i></dt>
539 <dd>
540 type of the plugins (string)
541 </dd>
542 </dl><dl>
543 <dt>Returns:</dt>
544 <dd>
545 dictionary with name as key and display string as value
546 (dictionary of string)
547 </dd>
548 </dl><a NAME="PluginManager.getPluginExeDisplayData" ID="PluginManager.getPluginExeDisplayData"></a>
549 <h4>PluginManager.getPluginExeDisplayData</h4>
550 <b>getPluginExeDisplayData</b>(<i></i>)
551 <p>
552 Public method to get data to display information about a plugins
553 external tool.
554 </p><dl>
555 <dt>Returns:</dt>
556 <dd>
557 list of dictionaries containing the data. Each dictionary must
558 either contain data for the determination or the data to be
559 displayed.<br />
560 A dictionary of the first form must have the following entries:
561 <ul>
562 <li>programEntry - indicator for this dictionary form
563 (boolean), always True</li>
564 <li>header - string to be diplayed as a header (string)</li>
565 <li>exe - the executable (string)</li>
566 <li>versionCommand - commandline parameter for the exe
567 (string)</li>
568 <li>versionStartsWith - indicator for the output line
569 containing the version (string)</li>
570 <li>versionPosition - number of element containing the
571 version (integer)</li>
572 <li>version - version to be used as default (string)</li>
573 <li>versionCleanup - tuple of two integers giving string
574 positions start and stop for the version string
575 (tuple of integers)</li>
576 </ul>
577 A dictionary of the second form must have the following entries:
578 <ul>
579 <li>programEntry - indicator for this dictionary form
580 (boolean), always False</li>
581 <li>header - string to be diplayed as a header (string)</li>
582 <li>text - entry text to be shown (string)</li>
583 <li>version - version text to be shown (string)</li>
584 </ul>
585 </dd>
586 </dl><a NAME="PluginManager.getPluginInfos" ID="PluginManager.getPluginInfos"></a>
587 <h4>PluginManager.getPluginInfos</h4>
588 <b>getPluginInfos</b>(<i></i>)
589 <p>
590 Public method to get infos about all loaded plugins.
591 </p><dl>
592 <dt>Returns:</dt>
593 <dd>
594 list of tuples giving module name (string), plugin name
595 (string), version (string), autoactivate (boolean), active
596 (boolean), short description (string), error flag (boolean)
597 </dd>
598 </dl><a NAME="PluginManager.getPluginModules" ID="PluginManager.getPluginModules"></a>
599 <h4>PluginManager.getPluginModules</h4>
600 <b>getPluginModules</b>(<i>pluginPath</i>)
601 <p>
602 Public method to get a list of plugin modules.
603 </p><dl>
604 <dt><i>pluginPath</i></dt>
605 <dd>
606 name of the path to search (string)
607 </dd>
608 </dl><dl>
609 <dt>Returns:</dt>
610 <dd>
611 list of plugin module names (list of string)
612 </dd>
613 </dl><a NAME="PluginManager.getPluginObject" ID="PluginManager.getPluginObject"></a>
614 <h4>PluginManager.getPluginObject</h4>
615 <b>getPluginObject</b>(<i>type_, typename, maybeActive=False</i>)
616 <p>
617 Public method to activate an ondemand plugin given by type and
618 typename.
619 </p><dl>
620 <dt><i>type_</i></dt>
621 <dd>
622 type of the plugin to be activated (string)
623 </dd><dt><i>typename</i></dt>
624 <dd>
625 name of the plugin within the type category (string)
626 </dd><dt><i>maybeActive=</i></dt>
627 <dd>
628 flag indicating, that the plugin may be active
629 already (boolean)
630 </dd>
631 </dl><dl>
632 <dt>Returns:</dt>
633 <dd>
634 reference to the initialized plugin object
635 </dd>
636 </dl><a NAME="PluginManager.getPluginPreviewPixmap" ID="PluginManager.getPluginPreviewPixmap"></a>
637 <h4>PluginManager.getPluginPreviewPixmap</h4>
638 <b>getPluginPreviewPixmap</b>(<i>type_, name</i>)
639 <p>
640 Public method to get a preview pixmap of a plugin of a specific type.
641 </p><dl>
642 <dt><i>type_</i></dt>
643 <dd>
644 type of the plugin (string)
645 </dd><dt><i>name</i></dt>
646 <dd>
647 name of the plugin type (string)
648 </dd>
649 </dl><dl>
650 <dt>Returns:</dt>
651 <dd>
652 preview pixmap (QPixmap)
653 </dd>
654 </dl><a NAME="PluginManager.getVcsSystemIndicators" ID="PluginManager.getVcsSystemIndicators"></a>
655 <h4>PluginManager.getVcsSystemIndicators</h4>
656 <b>getVcsSystemIndicators</b>(<i></i>)
657 <p>
658 Public method to get the Vcs System indicators.
659 </p><p>
660 Plugins supporting this functionality must support the module function
661 getVcsSystemIndicator returning a dictionary with indicator as key and
662 a tuple with the vcs name (string) and vcs display string (string).
663 </p><dl>
664 <dt>Returns:</dt>
665 <dd>
666 dictionary with indicator as key and a list of tuples as
667 values. Each tuple contains the vcs name (string) and vcs display
668 string (string).
669 </dd>
670 </dl><a NAME="PluginManager.initOnDemandPlugin" ID="PluginManager.initOnDemandPlugin"></a>
671 <h4>PluginManager.initOnDemandPlugin</h4>
672 <b>initOnDemandPlugin</b>(<i>name</i>)
673 <p>
674 Public method to create a plugin object for the named on demand plugin.
675 </p><p>
676 Note: The plug-in is not activated.
677 </p><dl>
678 <dt><i>name</i></dt>
679 <dd>
680 name of the plug-in (string)
681 </dd>
682 </dl><dl>
683 <dt>Raises <b>PluginActivationError</b>:</dt>
684 <dd>
685 raised to indicate an issue during the
686 plug-in activation
687 </dd>
688 </dl><a NAME="PluginManager.initOnDemandPlugins" ID="PluginManager.initOnDemandPlugins"></a>
689 <h4>PluginManager.initOnDemandPlugins</h4>
690 <b>initOnDemandPlugins</b>(<i></i>)
691 <p>
692 Public method to create plugin objects for all on demand plugins.
693 </p><p>
694 Note: The plugins are not activated.
695 </p><a NAME="PluginManager.isPluginActive" ID="PluginManager.isPluginActive"></a>
696 <h4>PluginManager.isPluginActive</h4>
697 <b>isPluginActive</b>(<i>pluginName</i>)
698 <p>
699 Public method to check, if a certain plugin is active.
700 </p><dl>
701 <dt><i>pluginName</i></dt>
702 <dd>
703 name of the plugin to check for (string)
704 </dd>
705 </dl><dl>
706 <dt>Returns:</dt>
707 <dd>
708 flag indicating, if the plugin is active (boolean)
709 </dd>
710 </dl><a NAME="PluginManager.isPluginLoaded" ID="PluginManager.isPluginLoaded"></a>
711 <h4>PluginManager.isPluginLoaded</h4>
712 <b>isPluginLoaded</b>(<i>pluginName</i>)
713 <p>
714 Public method to check, if a certain plugin is loaded.
715 </p><dl>
716 <dt><i>pluginName</i></dt>
717 <dd>
718 name of the plugin to check for (string)
719 </dd>
720 </dl><dl>
721 <dt>Returns:</dt>
722 <dd>
723 flag indicating, if the plugin is loaded (boolean)
724 </dd>
725 </dl><a NAME="PluginManager.isValidPluginName" ID="PluginManager.isValidPluginName"></a>
726 <h4>PluginManager.isValidPluginName</h4>
727 <b>isValidPluginName</b>(<i>pluginName</i>)
728 <p>
729 Public methode to check, if a file name is a valid plugin name.
730 </p><p>
731 Plugin modules must start with "Plugin" and have the extension ".py".
732 </p><dl>
733 <dt><i>pluginName</i></dt>
734 <dd>
735 name of the file to be checked (string)
736 </dd>
737 </dl><dl>
738 <dt>Returns:</dt>
739 <dd>
740 flag indicating a valid plugin name (boolean)
741 </dd>
742 </dl><a NAME="PluginManager.loadPlugin" ID="PluginManager.loadPlugin"></a>
743 <h4>PluginManager.loadPlugin</h4>
744 <b>loadPlugin</b>(<i>name, directory, reload_=False</i>)
745 <p>
746 Public method to load a plugin module.
747 </p><p>
748 Initially all modules are inactive. Modules that are requested on
749 demand are sorted out and are added to the on demand list. Some
750 basic validity checks are performed as well. Modules failing these
751 checks are added to the failed modules list.
752 </p><dl>
753 <dt><i>name</i></dt>
754 <dd>
755 name of the module to be loaded (string)
756 </dd><dt><i>directory</i></dt>
757 <dd>
758 name of the plugin directory (string)
759 </dd><dt><i>reload_</i></dt>
760 <dd>
761 flag indicating to reload the module (boolean)
762 </dd>
763 </dl><dl>
764 <dt>Raises <b>PluginLoadError</b>:</dt>
765 <dd>
766 raised to indicate an issue loading
767 the plug-in
768 </dd>
769 </dl><a NAME="PluginManager.preferencesChanged" ID="PluginManager.preferencesChanged"></a>
770 <h4>PluginManager.preferencesChanged</h4>
771 <b>preferencesChanged</b>(<i></i>)
772 <p>
773 Public slot to react to changes in configuration.
774 </p><a NAME="PluginManager.removePluginFromSysModules" ID="PluginManager.removePluginFromSysModules"></a>
775 <h4>PluginManager.removePluginFromSysModules</h4>
776 <b>removePluginFromSysModules</b>(<i>pluginName, package, internalPackages</i>)
777 <p>
778 Public method to remove a plugin and all related modules from
779 sys.modules.
780 </p><dl>
781 <dt><i>pluginName</i></dt>
782 <dd>
783 name of the plugin module (string)
784 </dd><dt><i>package</i></dt>
785 <dd>
786 name of the plugin package (string)
787 </dd><dt><i>internalPackages</i></dt>
788 <dd>
789 list of intenal packages (list of string)
790 </dd>
791 </dl><dl>
792 <dt>Returns:</dt>
793 <dd>
794 flag indicating the plugin module was found in sys.modules
795 (boolean)
796 </dd>
797 </dl><a NAME="PluginManager.unloadPlugin" ID="PluginManager.unloadPlugin"></a>
798 <h4>PluginManager.unloadPlugin</h4>
799 <b>unloadPlugin</b>(<i>name</i>)
800 <p>
801 Public method to unload a plugin module.
802 </p><dl>
803 <dt><i>name</i></dt>
804 <dd>
805 name of the module to be unloaded (string)
806 </dd>
807 </dl><dl>
808 <dt>Returns:</dt>
809 <dd>
810 flag indicating success (boolean)
811 </dd>
812 </dl>
813 <div align="right"><a href="#top">Up</a></div>
814 <hr />
815 </body></html>

eric ide

mercurial