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