Debian Codegraph @

envisage/i_extension_provider.py

raw
1 # (C) Copyright 2007-2025 Enthought, Inc., Austin, TX
2 # All rights reserved.
3 #
4 # This software is provided without warranty under the terms of the BSD
5 # license included in LICENSE.txt and may be redistributed only under
6 # the conditions described in the aforementioned license. The license
7 # is also available online at http://www.enthought.com/licenses/BSD.txt
8 #
9 # Thanks for using Enthought open source!
10 """ The interface for extension providers. """
11
12
13 # Enthought library imports.
14 from traits.api import Event, Interface
15
16 # Local imports.
17 from .extension_point_changed_event import ExtensionPointChangedEvent
18
19
20 class IExtensionProvider(Interface):
21 """The interface for extension providers."""
22
23 # The event fired when one of the provider's extension points has changed.
24 extension_point_changed = Event(ExtensionPointChangedEvent)
25
26 def get_extension_points(self):
27 """Return the extension points offered by the provider.
28
29 Return an empty list if the provider does not offer any extension
30 points.
31
32 """
33
34 def get_extensions(self, extension_point_id):
35 """Return the provider's extensions to an extension point.
36
37 The return value *must* be a list. Return an empty list if the provider
38 does not contribute any extensions to the extension point.
39
40 """