Documentation/Source/eric4.PluginManager.PluginManager.html

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

eric ide

mercurial