envisage.i_plugin_manager module

The plugin manager interface.

class envisage.i_plugin_manager.IPluginManager(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]

Bases: Interface

The plugin manager interface.

add_plugin(plugin)[source]

Add a plugin to the manager.

get_plugin(plugin_id)[source]

Return the plugin with the specified Id.

Return None if no such plugin exists.

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.

remove_plugin(plugin)[source]

Remove a plugin from the manager.

start()[source]

Start the plugin manager.

This starts all of the manager’s plugins.

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

Start the specified plugin.

If a plugin is specified then start it.

If no plugin is specified then the Id is used to look up the plugin and then start it. If no such plugin exists then a ‘ValueError’ exception is raised.

stop()[source]

Stop the plugin manager.

This stop’s all of the plugin manager’s plugins (in the reverse order that they were started).

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

Stop the specified plugin.

If a plugin is specified then stop it (the Id is ignored).

If no plugin is specified then the Id is used to look up the plugin and then stop it. If no such plugin exists then a ‘ValueError’ exception is raised.