eric6/Documentation/Source/eric6.PluginManager.PluginManager.html

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

eric ide

mercurial