/usr/share/pyshared/envisage/extension_provider.py is in python-envisage 4.4.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | """ The default base class for extension providers. """
# Enthought library imports.
from traits.api import Event, HasTraits, implements
# Local imports.
from extension_point_changed_event import ExtensionPointChangedEvent
from i_extension_provider import IExtensionProvider
class ExtensionProvider(HasTraits):
""" The default base class for extension providers. """
implements(IExtensionProvider)
#### 'IExtensionProvider' interface #######################################
# The event fired when one of the provider's extension points has been
# changed (where 'changed' means that the provider has added or removed
# contributions to or from an extension point).
extension_point_changed = Event(ExtensionPointChangedEvent)
def get_extension_points(self):
""" Return the extension points offered by the provider. """
return []
def get_extensions(self, extension_point_id):
""" Return the provider's extensions to an extension point. """
return []
##### Protected 'ExtensionProvider' interface #############################
def _fire_extension_point_changed(
self, extension_point_id, added, removed, index
):
""" Fire an extension point changed event. """
self.extension_point_changed = ExtensionPointChangedEvent(
extension_point_id = extension_point_id,
added = added,
removed = removed,
index = index
)
return
#### EOF ######################################################################
|