envisage.application module¶
An extensible, pluggable, application.
- class envisage.application.Application(plugins=None, **traits)[source]¶
Bases:
HasTraits
An extensible, pluggable, application.
This class handles the common case for non-GUI applications, and it is intended to be subclassed to change start/stop behaviour etc.
- add_extension_point_listener(listener, extension_point_id=None)[source]¶
Add a listener for extensions being added/removed.
- extension_registry = Instance(IExtensionRegistry)¶
The extension registry.
- get_extensions(extension_point_id)[source]¶
Return a list containing all contributions to an extension point.
- get_required_service(protocol, query='', minimize='', maximize='')[source]¶
Return the service that matches the specified query.
Raise a ‘NoSuchServiceError’ exception if no such service exists.
- get_service(protocol, query='', minimize='', maximize='')[source]¶
Return at most one service that matches the specified query.
- get_service_properties(service_id)[source]¶
Return the dictionary of properties associated with a service.
- get_services(protocol, query='', minimize='', maximize='')[source]¶
Return all services that match the specified query.
- home = Str¶
The name of a directory (created for you) to which the application can read and write non-user accessible data, i.e. configuration information, preferences, etc.
- id = Str¶
The application’s globally unique identifier.
- plugin_added = Delegate("plugin_manager", modify=True)¶
Fired when a plugin has been added.
- plugin_manager = Instance(IPluginManager)¶
The plugin manager (starts and stops plugins etc).
- plugin_removed = Delegate("plugin_manager", modify=True)¶
Fired when a plugin has been removed.
- preferences = Instance(IPreferences)¶
The root preferences node.
- remove_extension_point_listener(listener, extension_point_id=None)[source]¶
Remove a listener for extensions being added/removed.
- service_registry = Instance(IServiceRegistry)¶
The service registry.
- set_extensions(extension_point_id, extensions)[source]¶
Set the extensions contributed to an extension point.
- set_service_properties(service_id, properties)[source]¶
Set the dictionary of properties associated with a service.
- started = Event(ApplicationEvent)¶
Fired when all plugins have been started.
- starting = VetoableEvent(ApplicationEvent)¶
Fired when the application is starting.
- stopped = Event(ApplicationEvent)¶
Fired when all plugins have been stopped.
- stopping = VetoableEvent(ApplicationEvent)¶
Fired when the application is stopping.
- user_data = Str¶
The name of a directory (created for you upon access) to which the application can read and write user-accessible data, e.g. projects created by the user.