src/eric7/Documentation/Source/eric7.PluginManager.PluginManager.html

branch
eric7
changeset 9209
b99e7fd55fd3
parent 9031
8c9013b363bc
child 9303
91f61f6e3ffb
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.PluginManager.PluginManager</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.PluginManager.PluginManager</h1>
10
11 <p>
12 Module implementing the Plugin Manager.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#PluginManager">PluginManager</a></td>
25 <td>Class implementing the Plugin Manager.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="PluginManager" ID="PluginManager"></a>
36 <h2>PluginManager</h2>
37
38 <p>
39 Class implementing the Plugin Manager.
40 </p>
41 <h3>Signals</h3>
42 <dl>
43
44 <dt>allPlugginsActivated()</dt>
45 <dd>
46 emitted at startup after all plugins have
47 been activated
48 </dd>
49 <dt>pluginAboutToBeActivated(modulName, pluginObject)</dt>
50 <dd>
51 emitted just
52 before a plugin is activated
53 </dd>
54 <dt>pluginAboutToBeDeactivated(moduleName, pluginObject)</dt>
55 <dd>
56 emitted just
57 before a plugin is deactivated
58 </dd>
59 <dt>pluginActivated(moduleName, pluginObject)</dt>
60 <dd>
61 emitted just after
62 a plugin was activated
63 </dd>
64 <dt>pluginDeactivated(moduleName, pluginObject)</dt>
65 <dd>
66 emitted just after
67 a plugin was deactivated
68 </dd>
69 <dt>pluginRepositoryFileDownloaded()</dt>
70 <dd>
71 emitted to indicate a completed
72 download of the plugin repository file
73 </dd>
74 <dt>shutdown()</dt>
75 <dd>
76 emitted at shutdown of the IDE
77 </dd>
78 </dl>
79 <h3>Derived from</h3>
80 QObject
81 <h3>Class Attributes</h3>
82
83 <table>
84 <tr><td>None</td></tr>
85 </table>
86 <h3>Class Methods</h3>
87
88 <table>
89 <tr><td>None</td></tr>
90 </table>
91 <h3>Methods</h3>
92
93 <table>
94
95 <tr>
96 <td><a href="#PluginManager.__init__">PluginManager</a></td>
97 <td>Constructor</td>
98 </tr>
99 <tr>
100 <td><a href="#PluginManager.__canActivatePlugin">__canActivatePlugin</a></td>
101 <td>Private method to check, if a plugin can be activated.</td>
102 </tr>
103 <tr>
104 <td><a href="#PluginManager.__canDeactivatePlugin">__canDeactivatePlugin</a></td>
105 <td>Private method to check, if a plugin can be deactivated.</td>
106 </tr>
107 <tr>
108 <td><a href="#PluginManager.__checkPluginsDownloadDirectory">__checkPluginsDownloadDirectory</a></td>
109 <td>Private slot to check for the existence of the plugins download directory.</td>
110 </tr>
111 <tr>
112 <td><a href="#PluginManager.__downloadRepositoryFileDone">__downloadRepositoryFileDone</a></td>
113 <td>Private method called after the repository file was downloaded.</td>
114 </tr>
115 <tr>
116 <td><a href="#PluginManager.__getShortInfo">__getShortInfo</a></td>
117 <td>Private method to extract the short info from a module.</td>
118 </tr>
119 <tr>
120 <td><a href="#PluginManager.__insertPluginsPaths">__insertPluginsPaths</a></td>
121 <td>Private method to insert the valid plugin paths intos the search path.</td>
122 </tr>
123 <tr>
124 <td><a href="#PluginManager.__loadPlugins">__loadPlugins</a></td>
125 <td>Private method to load the plugins found.</td>
126 </tr>
127 <tr>
128 <td><a href="#PluginManager.__pluginDirectoriesExist">__pluginDirectoriesExist</a></td>
129 <td>Private method to check, if the plugin folders exist.</td>
130 </tr>
131 <tr>
132 <td><a href="#PluginManager.__pluginModulesExist">__pluginModulesExist</a></td>
133 <td>Private method to check, if there are plugins available.</td>
134 </tr>
135 <tr>
136 <td><a href="#PluginManager.__sslErrors">__sslErrors</a></td>
137 <td>Private slot to handle SSL errors.</td>
138 </tr>
139 <tr>
140 <td><a href="#PluginManager.activatePlugin">activatePlugin</a></td>
141 <td>Public method to activate a plugin.</td>
142 </tr>
143 <tr>
144 <td><a href="#PluginManager.activatePlugins">activatePlugins</a></td>
145 <td>Public method to activate all plugins having the "autoactivate" attribute set to True.</td>
146 </tr>
147 <tr>
148 <td><a href="#PluginManager.checkPluginEntry">checkPluginEntry</a></td>
149 <td>Public method to check a plug-in's data for an update.</td>
150 </tr>
151 <tr>
152 <td><a href="#PluginManager.checkPluginUpdatesAvailable">checkPluginUpdatesAvailable</a></td>
153 <td>Public method to check the availability of updates of plug-ins.</td>
154 </tr>
155 <tr>
156 <td><a href="#PluginManager.clearPluginsPrivateData">clearPluginsPrivateData</a></td>
157 <td>Public method to clear the private data of plug-ins of a specified type.</td>
158 </tr>
159 <tr>
160 <td><a href="#PluginManager.deactivatePlugin">deactivatePlugin</a></td>
161 <td>Public method to deactivate a plugin.</td>
162 </tr>
163 <tr>
164 <td><a href="#PluginManager.deactivateVcsPlugins">deactivateVcsPlugins</a></td>
165 <td>Public method to deactivated all activated VCS plugins.</td>
166 </tr>
167 <tr>
168 <td><a href="#PluginManager.doShutdown">doShutdown</a></td>
169 <td>Public method called to perform actions upon shutdown of the IDE.</td>
170 </tr>
171 <tr>
172 <td><a href="#PluginManager.downLoadRepositoryFile">downLoadRepositoryFile</a></td>
173 <td>Public method to download the plugin repository file.</td>
174 </tr>
175 <tr>
176 <td><a href="#PluginManager.finalizeSetup">finalizeSetup</a></td>
177 <td>Public method to finalize the setup of the plugin manager.</td>
178 </tr>
179 <tr>
180 <td><a href="#PluginManager.getPluginApiFiles">getPluginApiFiles</a></td>
181 <td>Public method to get the list of API files installed by a plugin.</td>
182 </tr>
183 <tr>
184 <td><a href="#PluginManager.getPluginConfigData">getPluginConfigData</a></td>
185 <td>Public method to get the config data of all active, non on-demand plugins used by the configuration dialog.</td>
186 </tr>
187 <tr>
188 <td><a href="#PluginManager.getPluginDetails">getPluginDetails</a></td>
189 <td>Public method to get detailed information about a plugin.</td>
190 </tr>
191 <tr>
192 <td><a href="#PluginManager.getPluginDir">getPluginDir</a></td>
193 <td>Public method to get the path of a plugin directory.</td>
194 </tr>
195 <tr>
196 <td><a href="#PluginManager.getPluginDisplayStrings">getPluginDisplayStrings</a></td>
197 <td>Public method to get the display strings of all plugins of a specific type.</td>
198 </tr>
199 <tr>
200 <td><a href="#PluginManager.getPluginExeDisplayData">getPluginExeDisplayData</a></td>
201 <td>Public method to get data to display information about a plugins external tool.</td>
202 </tr>
203 <tr>
204 <td><a href="#PluginManager.getPluginInfos">getPluginInfos</a></td>
205 <td>Public method to get infos about all loaded plug-ins.</td>
206 </tr>
207 <tr>
208 <td><a href="#PluginManager.getPluginModules">getPluginModules</a></td>
209 <td>Public method to get a list of plugin modules.</td>
210 </tr>
211 <tr>
212 <td><a href="#PluginManager.getPluginObject">getPluginObject</a></td>
213 <td>Public method to activate an ondemand plugin given by type and typename.</td>
214 </tr>
215 <tr>
216 <td><a href="#PluginManager.getPluginPreviewPixmap">getPluginPreviewPixmap</a></td>
217 <td>Public method to get a preview pixmap of a plugin of a specific type.</td>
218 </tr>
219 <tr>
220 <td><a href="#PluginManager.getPluginQtHelpFiles">getPluginQtHelpFiles</a></td>
221 <td>Public method to get the list of QtHelp documentation files provided by a plug-in.</td>
222 </tr>
223 <tr>
224 <td><a href="#PluginManager.getVcsSystemIndicators">getVcsSystemIndicators</a></td>
225 <td>Public method to get the Vcs System indicators.</td>
226 </tr>
227 <tr>
228 <td><a href="#PluginManager.initOnDemandPlugin">initOnDemandPlugin</a></td>
229 <td>Public method to create a plugin object for the named on demand plugin.</td>
230 </tr>
231 <tr>
232 <td><a href="#PluginManager.initOnDemandPlugins">initOnDemandPlugins</a></td>
233 <td>Public method to create plugin objects for all on demand plugins.</td>
234 </tr>
235 <tr>
236 <td><a href="#PluginManager.initPluginToolbars">initPluginToolbars</a></td>
237 <td>Public method to initialize plug-in toolbars.</td>
238 </tr>
239 <tr>
240 <td><a href="#PluginManager.isPluginActive">isPluginActive</a></td>
241 <td>Public method to check, if a certain plugin is active.</td>
242 </tr>
243 <tr>
244 <td><a href="#PluginManager.isPluginLoaded">isPluginLoaded</a></td>
245 <td>Public method to check, if a certain plugin is loaded.</td>
246 </tr>
247 <tr>
248 <td><a href="#PluginManager.isValidPluginName">isValidPluginName</a></td>
249 <td>Public method to check, if a file name is a valid plugin name.</td>
250 </tr>
251 <tr>
252 <td><a href="#PluginManager.loadDocumentationSetPlugins">loadDocumentationSetPlugins</a></td>
253 <td>Public method to load just the documentation sets plugins.</td>
254 </tr>
255 <tr>
256 <td><a href="#PluginManager.loadPlugin">loadPlugin</a></td>
257 <td>Public method to load a plugin module.</td>
258 </tr>
259 <tr>
260 <td><a href="#PluginManager.pipInstall">pipInstall</a></td>
261 <td>Public method to install the given package via pip.</td>
262 </tr>
263 <tr>
264 <td><a href="#PluginManager.preferencesChanged">preferencesChanged</a></td>
265 <td>Public slot to react to changes in configuration.</td>
266 </tr>
267 <tr>
268 <td><a href="#PluginManager.removePluginFromSysModules">removePluginFromSysModules</a></td>
269 <td>Public method to remove a plugin and all related modules from sys.modules.</td>
270 </tr>
271 <tr>
272 <td><a href="#PluginManager.unloadPlugin">unloadPlugin</a></td>
273 <td>Public method to unload a plugin module.</td>
274 </tr>
275 </table>
276 <h3>Static Methods</h3>
277
278 <table>
279 <tr><td>None</td></tr>
280 </table>
281
282 <a NAME="PluginManager.__init__" ID="PluginManager.__init__"></a>
283 <h4>PluginManager (Constructor)</h4>
284 <b>PluginManager</b>(<i>parent=None, disabledPlugins=None, doLoadPlugins=True, develPlugin=None</i>)
285
286 <p>
287 Constructor
288 </p>
289 <p>
290 The Plugin Manager deals with three different plugin directories.
291 The first is the one, that is part of eric7 (eric7/Plugins). The
292 second one is the global plugin directory called 'eric7plugins',
293 which is located inside the site-packages directory. The last one
294 is the user plugin directory located inside the .eric7 directory
295 of the users home directory.
296 </p>
297 <dl>
298
299 <dt><i>parent</i> (QObject)</dt>
300 <dd>
301 reference to the parent object
302 </dd>
303 <dt><i>disabledPlugins</i> (list of str)</dt>
304 <dd>
305 list of plug-ins that have been disabled via
306 the command line parameters '--disable-plugin='
307 </dd>
308 <dt><i>doLoadPlugins</i> (bool)</dt>
309 <dd>
310 flag indicating, that plug-ins should
311 be loaded
312 </dd>
313 <dt><i>develPlugin</i> (str)</dt>
314 <dd>
315 filename of a plug-in to be loaded for
316 development
317 </dd>
318 </dl>
319 <dl>
320
321 <dt>Raises <b>PluginModulesError</b>:</dt>
322 <dd>
323 raised to indicate the absence of
324 plug-in modules
325 </dd>
326 <dt>Raises <b>PluginPathError</b>:</dt>
327 <dd>
328 raised to indicate an invalid plug-in path
329 </dd>
330 </dl>
331 <a NAME="PluginManager.__canActivatePlugin" ID="PluginManager.__canActivatePlugin"></a>
332 <h4>PluginManager.__canActivatePlugin</h4>
333 <b>__canActivatePlugin</b>(<i>module</i>)
334
335 <p>
336 Private method to check, if a plugin can be activated.
337 </p>
338 <dl>
339
340 <dt><i>module</i></dt>
341 <dd>
342 reference to the module to be activated
343 </dd>
344 </dl>
345 <dl>
346 <dt>Return:</dt>
347 <dd>
348 flag indicating, if the module satisfies all requirements
349 for being activated (boolean)
350 </dd>
351 </dl>
352 <dl>
353
354 <dt>Raises <b>PluginClassFormatError</b>:</dt>
355 <dd>
356 raised to indicate an invalid
357 plug-in class format
358 </dd>
359 <dt>Raises <b>PluginModuleFormatError</b>:</dt>
360 <dd>
361 raised to indicate an invalid
362 plug-in module format
363 </dd>
364 </dl>
365 <a NAME="PluginManager.__canDeactivatePlugin" ID="PluginManager.__canDeactivatePlugin"></a>
366 <h4>PluginManager.__canDeactivatePlugin</h4>
367 <b>__canDeactivatePlugin</b>(<i>module</i>)
368
369 <p>
370 Private method to check, if a plugin can be deactivated.
371 </p>
372 <dl>
373
374 <dt><i>module</i></dt>
375 <dd>
376 reference to the module to be deactivated
377 </dd>
378 </dl>
379 <dl>
380 <dt>Return:</dt>
381 <dd>
382 flag indicating, if the module satisfies all requirements
383 for being deactivated (boolean)
384 </dd>
385 </dl>
386 <a NAME="PluginManager.__checkPluginsDownloadDirectory" ID="PluginManager.__checkPluginsDownloadDirectory"></a>
387 <h4>PluginManager.__checkPluginsDownloadDirectory</h4>
388 <b>__checkPluginsDownloadDirectory</b>(<i></i>)
389
390 <p>
391 Private slot to check for the existence of the plugins download
392 directory.
393 </p>
394 <a NAME="PluginManager.__downloadRepositoryFileDone" ID="PluginManager.__downloadRepositoryFileDone"></a>
395 <h4>PluginManager.__downloadRepositoryFileDone</h4>
396 <b>__downloadRepositoryFileDone</b>(<i>reply</i>)
397
398 <p>
399 Private method called after the repository file was downloaded.
400 </p>
401 <dl>
402
403 <dt><i>reply</i> (QNetworkReply)</dt>
404 <dd>
405 reference to the reply object of the download
406 </dd>
407 </dl>
408 <a NAME="PluginManager.__getShortInfo" ID="PluginManager.__getShortInfo"></a>
409 <h4>PluginManager.__getShortInfo</h4>
410 <b>__getShortInfo</b>(<i>module</i>)
411
412 <p>
413 Private method to extract the short info from a module.
414 </p>
415 <dl>
416
417 <dt><i>module</i></dt>
418 <dd>
419 module to extract short info from
420 </dd>
421 </dl>
422 <dl>
423 <dt>Return:</dt>
424 <dd>
425 dictionay containing plug-in data
426 </dd>
427 </dl>
428 <dl>
429 <dt>Return Type:</dt>
430 <dd>
431 dict ("plugin_name": str, "version": str, "short_desc": str,
432 "error": bool)
433 </dd>
434 </dl>
435 <a NAME="PluginManager.__insertPluginsPaths" ID="PluginManager.__insertPluginsPaths"></a>
436 <h4>PluginManager.__insertPluginsPaths</h4>
437 <b>__insertPluginsPaths</b>(<i></i>)
438
439 <p>
440 Private method to insert the valid plugin paths intos the search path.
441 </p>
442 <a NAME="PluginManager.__loadPlugins" ID="PluginManager.__loadPlugins"></a>
443 <h4>PluginManager.__loadPlugins</h4>
444 <b>__loadPlugins</b>(<i></i>)
445
446 <p>
447 Private method to load the plugins found.
448 </p>
449 <a NAME="PluginManager.__pluginDirectoriesExist" ID="PluginManager.__pluginDirectoriesExist"></a>
450 <h4>PluginManager.__pluginDirectoriesExist</h4>
451 <b>__pluginDirectoriesExist</b>(<i></i>)
452
453 <p>
454 Private method to check, if the plugin folders exist.
455 </p>
456 <p>
457 If the plugin folders don't exist, they are created (if possible).
458 </p>
459 <dl>
460 <dt>Return:</dt>
461 <dd>
462 tuple of a flag indicating existence of any of the plugin
463 directories (boolean) and a message (string)
464 </dd>
465 </dl>
466 <a NAME="PluginManager.__pluginModulesExist" ID="PluginManager.__pluginModulesExist"></a>
467 <h4>PluginManager.__pluginModulesExist</h4>
468 <b>__pluginModulesExist</b>(<i></i>)
469
470 <p>
471 Private method to check, if there are plugins available.
472 </p>
473 <dl>
474 <dt>Return:</dt>
475 <dd>
476 flag indicating the availability of plugins (boolean)
477 </dd>
478 </dl>
479 <a NAME="PluginManager.__sslErrors" ID="PluginManager.__sslErrors"></a>
480 <h4>PluginManager.__sslErrors</h4>
481 <b>__sslErrors</b>(<i>reply, errors</i>)
482
483 <p>
484 Private slot to handle SSL errors.
485 </p>
486 <dl>
487
488 <dt><i>reply</i></dt>
489 <dd>
490 reference to the reply object (QNetworkReply)
491 </dd>
492 <dt><i>errors</i></dt>
493 <dd>
494 list of SSL errors (list of QSslError)
495 </dd>
496 </dl>
497 <a NAME="PluginManager.activatePlugin" ID="PluginManager.activatePlugin"></a>
498 <h4>PluginManager.activatePlugin</h4>
499 <b>activatePlugin</b>(<i>name, onDemand=False</i>)
500
501 <p>
502 Public method to activate a plugin.
503 </p>
504 <dl>
505
506 <dt><i>name</i></dt>
507 <dd>
508 name of the module to be activated
509 </dd>
510 <dt><i>onDemand</i></dt>
511 <dd>
512 flag indicating activation of an
513 on demand plugin (boolean)
514 </dd>
515 </dl>
516 <dl>
517 <dt>Return:</dt>
518 <dd>
519 reference to the initialized plugin object
520 </dd>
521 </dl>
522 <dl>
523
524 <dt>Raises <b>PluginActivationError</b>:</dt>
525 <dd>
526 raised to indicate an issue during the
527 plug-in activation
528 </dd>
529 </dl>
530 <a NAME="PluginManager.activatePlugins" ID="PluginManager.activatePlugins"></a>
531 <h4>PluginManager.activatePlugins</h4>
532 <b>activatePlugins</b>(<i></i>)
533
534 <p>
535 Public method to activate all plugins having the "autoactivate"
536 attribute set to True.
537 </p>
538 <a NAME="PluginManager.checkPluginEntry" ID="PluginManager.checkPluginEntry"></a>
539 <h4>PluginManager.checkPluginEntry</h4>
540 <b>checkPluginEntry</b>(<i>name, short, description, url, author, version, filename, status</i>)
541
542 <p>
543 Public method to check a plug-in's data for an update.
544 </p>
545 <dl>
546
547 <dt><i>name</i></dt>
548 <dd>
549 data for the name field (string)
550 </dd>
551 <dt><i>short</i></dt>
552 <dd>
553 data for the short field (string)
554 </dd>
555 <dt><i>description</i></dt>
556 <dd>
557 data for the description field (list of strings)
558 </dd>
559 <dt><i>url</i></dt>
560 <dd>
561 data for the url field (string)
562 </dd>
563 <dt><i>author</i></dt>
564 <dd>
565 data for the author field (string)
566 </dd>
567 <dt><i>version</i></dt>
568 <dd>
569 data for the version field (string)
570 </dd>
571 <dt><i>filename</i></dt>
572 <dd>
573 data for the filename field (string)
574 </dd>
575 <dt><i>status</i></dt>
576 <dd>
577 status of the plugin (string [stable, unstable, unknown])
578 </dd>
579 </dl>
580 <a NAME="PluginManager.checkPluginUpdatesAvailable" ID="PluginManager.checkPluginUpdatesAvailable"></a>
581 <h4>PluginManager.checkPluginUpdatesAvailable</h4>
582 <b>checkPluginUpdatesAvailable</b>(<i></i>)
583
584 <p>
585 Public method to check the availability of updates of plug-ins.
586 </p>
587 <a NAME="PluginManager.clearPluginsPrivateData" ID="PluginManager.clearPluginsPrivateData"></a>
588 <h4>PluginManager.clearPluginsPrivateData</h4>
589 <b>clearPluginsPrivateData</b>(<i>type_</i>)
590
591 <p>
592 Public method to clear the private data of plug-ins of a specified
593 type.
594 </p>
595 <p>
596 Plugins supporting this functionality must support the module function
597 clearPrivateData() and have the module level attribute pluginType.
598 </p>
599 <dl>
600
601 <dt><i>type_</i></dt>
602 <dd>
603 type of the plugin to clear private data for (string)
604 </dd>
605 </dl>
606 <a NAME="PluginManager.deactivatePlugin" ID="PluginManager.deactivatePlugin"></a>
607 <h4>PluginManager.deactivatePlugin</h4>
608 <b>deactivatePlugin</b>(<i>name, onDemand=False</i>)
609
610 <p>
611 Public method to deactivate a plugin.
612 </p>
613 <dl>
614
615 <dt><i>name</i></dt>
616 <dd>
617 name of the module to be deactivated
618 </dd>
619 <dt><i>onDemand</i></dt>
620 <dd>
621 flag indicating deactivation of an
622 on demand plugin (boolean)
623 </dd>
624 </dl>
625 <a NAME="PluginManager.deactivateVcsPlugins" ID="PluginManager.deactivateVcsPlugins"></a>
626 <h4>PluginManager.deactivateVcsPlugins</h4>
627 <b>deactivateVcsPlugins</b>(<i></i>)
628
629 <p>
630 Public method to deactivated all activated VCS plugins.
631 </p>
632 <a NAME="PluginManager.doShutdown" ID="PluginManager.doShutdown"></a>
633 <h4>PluginManager.doShutdown</h4>
634 <b>doShutdown</b>(<i></i>)
635
636 <p>
637 Public method called to perform actions upon shutdown of the IDE.
638 </p>
639 <a NAME="PluginManager.downLoadRepositoryFile" ID="PluginManager.downLoadRepositoryFile"></a>
640 <h4>PluginManager.downLoadRepositoryFile</h4>
641 <b>downLoadRepositoryFile</b>(<i>url=None</i>)
642
643 <p>
644 Public method to download the plugin repository file.
645 </p>
646 <dl>
647
648 <dt><i>url</i> (QUrl or str (optional))</dt>
649 <dd>
650 URL to get the plugin repository file from
651 (defaults to None)
652 </dd>
653 </dl>
654 <a NAME="PluginManager.finalizeSetup" ID="PluginManager.finalizeSetup"></a>
655 <h4>PluginManager.finalizeSetup</h4>
656 <b>finalizeSetup</b>(<i></i>)
657
658 <p>
659 Public method to finalize the setup of the plugin manager.
660 </p>
661 <a NAME="PluginManager.getPluginApiFiles" ID="PluginManager.getPluginApiFiles"></a>
662 <h4>PluginManager.getPluginApiFiles</h4>
663 <b>getPluginApiFiles</b>(<i>language</i>)
664
665 <p>
666 Public method to get the list of API files installed by a plugin.
667 </p>
668 <dl>
669
670 <dt><i>language</i></dt>
671 <dd>
672 language of the requested API files (string)
673 </dd>
674 </dl>
675 <dl>
676 <dt>Return:</dt>
677 <dd>
678 list of API filenames (list of string)
679 </dd>
680 </dl>
681 <a NAME="PluginManager.getPluginConfigData" ID="PluginManager.getPluginConfigData"></a>
682 <h4>PluginManager.getPluginConfigData</h4>
683 <b>getPluginConfigData</b>(<i></i>)
684
685 <p>
686 Public method to get the config data of all active, non on-demand
687 plugins used by the configuration dialog.
688 </p>
689 <p>
690 Plugins supporting this functionality must provide the plugin module
691 function 'getConfigData' returning a dictionary with unique keys
692 of lists with the following list contents:
693 <dl>
694 <dt>display string</dt>
695 <dd>string shown in the selection area of the configuration page.
696 This should be a localized string</dd>
697 <dt>pixmap name</dt>
698 <dd>filename of the pixmap to be shown next to the display
699 string</dd>
700 <dt>page creation function</dt>
701 <dd>plugin module function to be called to create the configuration
702 page. The page must be subclasses from
703 Preferences.ConfigurationPages.ConfigurationPageBase and must
704 implement a method called 'save' to save the settings. A parent
705 entry will be created in the selection list, if this value is
706 None.</dd>
707 <dt>parent key</dt>
708 <dd>dictionary key of the parent entry or None, if this defines a
709 toplevel entry.</dd>
710 <dt>reference to configuration page</dt>
711 <dd>This will be used by the configuration dialog and must always
712 be None</dd>
713 </dl>
714 </p>
715 <dl>
716 <dt>Return:</dt>
717 <dd>
718 plug-in configuration data
719 </dd>
720 </dl>
721 <a NAME="PluginManager.getPluginDetails" ID="PluginManager.getPluginDetails"></a>
722 <h4>PluginManager.getPluginDetails</h4>
723 <b>getPluginDetails</b>(<i>name</i>)
724
725 <p>
726 Public method to get detailed information about a plugin.
727 </p>
728 <dl>
729
730 <dt><i>name</i></dt>
731 <dd>
732 name of the module to get detailed infos about (string)
733 </dd>
734 </dl>
735 <dl>
736 <dt>Return:</dt>
737 <dd>
738 details of the plugin as a dictionary
739 </dd>
740 </dl>
741 <a NAME="PluginManager.getPluginDir" ID="PluginManager.getPluginDir"></a>
742 <h4>PluginManager.getPluginDir</h4>
743 <b>getPluginDir</b>(<i>key</i>)
744
745 <p>
746 Public method to get the path of a plugin directory.
747 </p>
748 <dl>
749
750 <dt><i>key</i></dt>
751 <dd>
752 key of the plug-in directory (string)
753 </dd>
754 </dl>
755 <dl>
756 <dt>Return:</dt>
757 <dd>
758 path of the requested plugin directory (string)
759 </dd>
760 </dl>
761 <a NAME="PluginManager.getPluginDisplayStrings" ID="PluginManager.getPluginDisplayStrings"></a>
762 <h4>PluginManager.getPluginDisplayStrings</h4>
763 <b>getPluginDisplayStrings</b>(<i>type_</i>)
764
765 <p>
766 Public method to get the display strings of all plugins of a specific
767 type.
768 </p>
769 <dl>
770
771 <dt><i>type_</i></dt>
772 <dd>
773 type of the plugins (string)
774 </dd>
775 </dl>
776 <dl>
777 <dt>Return:</dt>
778 <dd>
779 dictionary with name as key and display string as value
780 (dictionary of string)
781 </dd>
782 </dl>
783 <a NAME="PluginManager.getPluginExeDisplayData" ID="PluginManager.getPluginExeDisplayData"></a>
784 <h4>PluginManager.getPluginExeDisplayData</h4>
785 <b>getPluginExeDisplayData</b>(<i></i>)
786
787 <p>
788 Public method to get data to display information about a plugins
789 external tool.
790 </p>
791 <dl>
792 <dt>Return:</dt>
793 <dd>
794 list of dictionaries containing the data. Each dictionary must
795 either contain data for the determination or the data to be
796 displayed.<br />
797 A dictionary of the first form must have the following entries:
798 <ul>
799 <li>programEntry - indicator for this dictionary form
800 (boolean), always True</li>
801 <li>header - string to be diplayed as a header (string)</li>
802 <li>exe - the executable (string)</li>
803 <li>versionCommand - commandline parameter for the exe
804 (string)</li>
805 <li>versionStartsWith - indicator for the output line
806 containing the version (string)</li>
807 <li>versionPosition - number of element containing the
808 version (integer)</li>
809 <li>version - version to be used as default (string)</li>
810 <li>versionCleanup - tuple of two integers giving string
811 positions start and stop for the version string
812 (tuple of integers)</li>
813 </ul>
814 A dictionary of the second form must have the following entries:
815 <ul>
816 <li>programEntry - indicator for this dictionary form
817 (boolean), always False</li>
818 <li>header - string to be diplayed as a header (string)</li>
819 <li>text - entry text to be shown (string)</li>
820 <li>version - version text to be shown (string)</li>
821 </ul>
822 </dd>
823 </dl>
824 <a NAME="PluginManager.getPluginInfos" ID="PluginManager.getPluginInfos"></a>
825 <h4>PluginManager.getPluginInfos</h4>
826 <b>getPluginInfos</b>(<i></i>)
827
828 <p>
829 Public method to get infos about all loaded plug-ins.
830 </p>
831 <dl>
832 <dt>Return:</dt>
833 <dd>
834 list of dictionaries with keys "module_name", "plugin_name",
835 "version", "auto_activate", "active", "short_desc", "error"
836 </dd>
837 </dl>
838 <dl>
839 <dt>Return Type:</dt>
840 <dd>
841 list of dict ("module_name": str, "plugin_name": str,
842 "version": str, "auto_activate": bool, "active": bool,
843 "short_desc": str, "error": bool)
844 </dd>
845 </dl>
846 <a NAME="PluginManager.getPluginModules" ID="PluginManager.getPluginModules"></a>
847 <h4>PluginManager.getPluginModules</h4>
848 <b>getPluginModules</b>(<i>pluginPath</i>)
849
850 <p>
851 Public method to get a list of plugin modules.
852 </p>
853 <dl>
854
855 <dt><i>pluginPath</i></dt>
856 <dd>
857 name of the path to search (string)
858 </dd>
859 </dl>
860 <dl>
861 <dt>Return:</dt>
862 <dd>
863 list of plugin module names (list of string)
864 </dd>
865 </dl>
866 <a NAME="PluginManager.getPluginObject" ID="PluginManager.getPluginObject"></a>
867 <h4>PluginManager.getPluginObject</h4>
868 <b>getPluginObject</b>(<i>type_, typename, maybeActive=False</i>)
869
870 <p>
871 Public method to activate an ondemand plugin given by type and
872 typename.
873 </p>
874 <dl>
875
876 <dt><i>type_</i></dt>
877 <dd>
878 type of the plugin to be activated (string)
879 </dd>
880 <dt><i>typename</i></dt>
881 <dd>
882 name of the plugin within the type category (string)
883 </dd>
884 <dt><i>maybeActive</i></dt>
885 <dd>
886 flag indicating, that the plugin may be active
887 already (boolean)
888 </dd>
889 </dl>
890 <dl>
891 <dt>Return:</dt>
892 <dd>
893 reference to the initialized plugin object
894 </dd>
895 </dl>
896 <a NAME="PluginManager.getPluginPreviewPixmap" ID="PluginManager.getPluginPreviewPixmap"></a>
897 <h4>PluginManager.getPluginPreviewPixmap</h4>
898 <b>getPluginPreviewPixmap</b>(<i>type_, name</i>)
899
900 <p>
901 Public method to get a preview pixmap of a plugin of a specific type.
902 </p>
903 <dl>
904
905 <dt><i>type_</i></dt>
906 <dd>
907 type of the plugin (string)
908 </dd>
909 <dt><i>name</i></dt>
910 <dd>
911 name of the plugin type (string)
912 </dd>
913 </dl>
914 <dl>
915 <dt>Return:</dt>
916 <dd>
917 preview pixmap (QPixmap)
918 </dd>
919 </dl>
920 <a NAME="PluginManager.getPluginQtHelpFiles" ID="PluginManager.getPluginQtHelpFiles"></a>
921 <h4>PluginManager.getPluginQtHelpFiles</h4>
922 <b>getPluginQtHelpFiles</b>(<i></i>)
923
924 <p>
925 Public method to get the list of QtHelp documentation files provided
926 by a plug-in.
927 </p>
928 <dl>
929 <dt>Return:</dt>
930 <dd>
931 dictionary with documentation type as key and list of files
932 as value
933 </dd>
934 </dl>
935 <dl>
936 <dt>Return Type:</dt>
937 <dd>
938 dict (key: str, value: list of str)
939 </dd>
940 </dl>
941 <a NAME="PluginManager.getVcsSystemIndicators" ID="PluginManager.getVcsSystemIndicators"></a>
942 <h4>PluginManager.getVcsSystemIndicators</h4>
943 <b>getVcsSystemIndicators</b>(<i></i>)
944
945 <p>
946 Public method to get the Vcs System indicators.
947 </p>
948 <p>
949 Plugins supporting this functionality must support the module function
950 getVcsSystemIndicator returning a dictionary with indicator as key and
951 a tuple with the vcs name (string) and vcs display string (string).
952 </p>
953 <dl>
954 <dt>Return:</dt>
955 <dd>
956 dictionary with indicator as key and a list of tuples as
957 values. Each tuple contains the vcs name (string) and vcs display
958 string (string).
959 </dd>
960 </dl>
961 <a NAME="PluginManager.initOnDemandPlugin" ID="PluginManager.initOnDemandPlugin"></a>
962 <h4>PluginManager.initOnDemandPlugin</h4>
963 <b>initOnDemandPlugin</b>(<i>name</i>)
964
965 <p>
966 Public method to create a plugin object for the named on demand plugin.
967 </p>
968 <p>
969 Note: The plug-in is not activated.
970 </p>
971 <dl>
972
973 <dt><i>name</i></dt>
974 <dd>
975 name of the plug-in (string)
976 </dd>
977 </dl>
978 <dl>
979
980 <dt>Raises <b>PluginActivationError</b>:</dt>
981 <dd>
982 raised to indicate an issue during the
983 plug-in activation
984 </dd>
985 </dl>
986 <a NAME="PluginManager.initOnDemandPlugins" ID="PluginManager.initOnDemandPlugins"></a>
987 <h4>PluginManager.initOnDemandPlugins</h4>
988 <b>initOnDemandPlugins</b>(<i></i>)
989
990 <p>
991 Public method to create plugin objects for all on demand plugins.
992 </p>
993 <p>
994 Note: The plugins are not activated.
995 </p>
996 <a NAME="PluginManager.initPluginToolbars" ID="PluginManager.initPluginToolbars"></a>
997 <h4>PluginManager.initPluginToolbars</h4>
998 <b>initPluginToolbars</b>(<i>toolbarManager</i>)
999
1000 <p>
1001 Public method to initialize plug-in toolbars.
1002 </p>
1003 <dl>
1004
1005 <dt><i>toolbarManager</i></dt>
1006 <dd>
1007 reference to the toolbar manager object
1008 (EricToolBarManager)
1009 </dd>
1010 </dl>
1011 <a NAME="PluginManager.isPluginActive" ID="PluginManager.isPluginActive"></a>
1012 <h4>PluginManager.isPluginActive</h4>
1013 <b>isPluginActive</b>(<i>pluginName</i>)
1014
1015 <p>
1016 Public method to check, if a certain plugin is active.
1017 </p>
1018 <dl>
1019
1020 <dt><i>pluginName</i></dt>
1021 <dd>
1022 name of the plugin to check for (string)
1023 </dd>
1024 </dl>
1025 <dl>
1026 <dt>Return:</dt>
1027 <dd>
1028 flag indicating, if the plugin is active (boolean)
1029 </dd>
1030 </dl>
1031 <a NAME="PluginManager.isPluginLoaded" ID="PluginManager.isPluginLoaded"></a>
1032 <h4>PluginManager.isPluginLoaded</h4>
1033 <b>isPluginLoaded</b>(<i>pluginName</i>)
1034
1035 <p>
1036 Public method to check, if a certain plugin is loaded.
1037 </p>
1038 <dl>
1039
1040 <dt><i>pluginName</i></dt>
1041 <dd>
1042 name of the plugin to check for (string)
1043 </dd>
1044 </dl>
1045 <dl>
1046 <dt>Return:</dt>
1047 <dd>
1048 flag indicating, if the plugin is loaded (boolean)
1049 </dd>
1050 </dl>
1051 <a NAME="PluginManager.isValidPluginName" ID="PluginManager.isValidPluginName"></a>
1052 <h4>PluginManager.isValidPluginName</h4>
1053 <b>isValidPluginName</b>(<i>pluginName</i>)
1054
1055 <p>
1056 Public method to check, if a file name is a valid plugin name.
1057 </p>
1058 <p>
1059 Plugin modules must start with "Plugin" and have the extension ".py".
1060 </p>
1061 <dl>
1062
1063 <dt><i>pluginName</i></dt>
1064 <dd>
1065 name of the file to be checked (string)
1066 </dd>
1067 </dl>
1068 <dl>
1069 <dt>Return:</dt>
1070 <dd>
1071 flag indicating a valid plugin name (boolean)
1072 </dd>
1073 </dl>
1074 <a NAME="PluginManager.loadDocumentationSetPlugins" ID="PluginManager.loadDocumentationSetPlugins"></a>
1075 <h4>PluginManager.loadDocumentationSetPlugins</h4>
1076 <b>loadDocumentationSetPlugins</b>(<i></i>)
1077
1078 <p>
1079 Public method to load just the documentation sets plugins.
1080 </p>
1081 <dl>
1082
1083 <dt>Raises <b>PluginModulesError</b>:</dt>
1084 <dd>
1085 raised to indicate the absence of
1086 plug-in modules
1087 </dd>
1088 </dl>
1089 <a NAME="PluginManager.loadPlugin" ID="PluginManager.loadPlugin"></a>
1090 <h4>PluginManager.loadPlugin</h4>
1091 <b>loadPlugin</b>(<i>name, directory, reload_=False, install=False</i>)
1092
1093 <p>
1094 Public method to load a plugin module.
1095 </p>
1096 <p>
1097 Initially all modules are inactive. Modules that are requested on
1098 demand are sorted out and are added to the on demand list. Some
1099 basic validity checks are performed as well. Modules failing these
1100 checks are added to the failed modules list.
1101 </p>
1102 <dl>
1103
1104 <dt><i>name</i> (str)</dt>
1105 <dd>
1106 name of the module to be loaded
1107 </dd>
1108 <dt><i>directory</i> (str)</dt>
1109 <dd>
1110 name of the plugin directory
1111 </dd>
1112 <dt><i>reload_</i> (bool)</dt>
1113 <dd>
1114 flag indicating to reload the module
1115 </dd>
1116 <dt><i>install</i> (bool)</dt>
1117 <dd>
1118 flag indicating a load operation as part of an
1119 installation process
1120 </dd>
1121 </dl>
1122 <dl>
1123
1124 <dt>Raises <b>PluginLoadError</b>:</dt>
1125 <dd>
1126 raised to indicate an issue loading
1127 the plug-in
1128 </dd>
1129 </dl>
1130 <a NAME="PluginManager.pipInstall" ID="PluginManager.pipInstall"></a>
1131 <h4>PluginManager.pipInstall</h4>
1132 <b>pipInstall</b>(<i>packages</i>)
1133
1134 <p>
1135 Public method to install the given package via pip.
1136 </p>
1137 <dl>
1138
1139 <dt><i>packages</i> (list of str)</dt>
1140 <dd>
1141 list of packages to install
1142 </dd>
1143 </dl>
1144 <a NAME="PluginManager.preferencesChanged" ID="PluginManager.preferencesChanged"></a>
1145 <h4>PluginManager.preferencesChanged</h4>
1146 <b>preferencesChanged</b>(<i></i>)
1147
1148 <p>
1149 Public slot to react to changes in configuration.
1150 </p>
1151 <a NAME="PluginManager.removePluginFromSysModules" ID="PluginManager.removePluginFromSysModules"></a>
1152 <h4>PluginManager.removePluginFromSysModules</h4>
1153 <b>removePluginFromSysModules</b>(<i>pluginName, package, internalPackages</i>)
1154
1155 <p>
1156 Public method to remove a plugin and all related modules from
1157 sys.modules.
1158 </p>
1159 <dl>
1160
1161 <dt><i>pluginName</i></dt>
1162 <dd>
1163 name of the plugin module (string)
1164 </dd>
1165 <dt><i>package</i></dt>
1166 <dd>
1167 name of the plugin package (string)
1168 </dd>
1169 <dt><i>internalPackages</i></dt>
1170 <dd>
1171 list of intenal packages (list of string)
1172 </dd>
1173 </dl>
1174 <dl>
1175 <dt>Return:</dt>
1176 <dd>
1177 flag indicating the plugin module was found in sys.modules
1178 (boolean)
1179 </dd>
1180 </dl>
1181 <a NAME="PluginManager.unloadPlugin" ID="PluginManager.unloadPlugin"></a>
1182 <h4>PluginManager.unloadPlugin</h4>
1183 <b>unloadPlugin</b>(<i>name</i>)
1184
1185 <p>
1186 Public method to unload a plugin module.
1187 </p>
1188 <dl>
1189
1190 <dt><i>name</i></dt>
1191 <dd>
1192 name of the module to be unloaded (string)
1193 </dd>
1194 </dl>
1195 <dl>
1196 <dt>Return:</dt>
1197 <dd>
1198 flag indicating success (boolean)
1199 </dd>
1200 </dl>
1201 <div align="right"><a href="#top">Up</a></div>
1202 <hr />
1203 </body></html>

eric ide

mercurial