envisage.plugin_manager module¶
A simple plugin manager implementation.
- class envisage.plugin_manager.PluginManager(plugins=None, **traits)[source]¶
Bases:
HasTraits
A simple plugin manager implementation.
This implementation manages an explicit collection of plugin instances, e.g:
plugin_manager = PluginManager(plugins=[MyPlugin(), YourPlugin()])
Plugins can be added and removed after construction time via the methods ‘add_plugin’ and ‘remove_plugin’.
- application = Instance(IApplication)¶
The application that the plugin manager is part of.
- exclude = List(Str)¶
An optional list of the Ids of the plugins that are to be excluded by the manager.
Each item in the list is actually an ‘fnmatch’ expression.
- include = List(Str)¶
An optional list of the Ids of the plugins that are to be included by the manager (i.e. only plugins with Ids in this list will be added to the manager).
Each item in the list is actually an ‘fnmatch’ expression.
- plugin_added = Event(PluginEvent)¶
Fired when a plugin has been added to the manager.
- plugin_removed = Event(PluginEvent)¶
Fired when a plugin has been removed from the manager.