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’.

add_plugin(plugin)[source]

Add a plugin to the manager.

application

The application that the plugin manager is part of.

get_plugin(plugin_id)[source]

Return the plugin with the specified Id.

plugin_added

Fired when a plugin has been added to the manager.

plugin_removed

Fired when a plugin has been removed from the manager.

remove_plugin(plugin)[source]

Remove a plugin from the manager.

start()[source]

Start the plugin manager.

start_plugin(plugin=None, plugin_id=None)[source]

Start the specified plugin.

stop()[source]

Stop the plugin manager.

stop_plugin(plugin=None, plugin_id=None)[source]

Stop the specified plugin.