Debian Codegraph @

envisage/i_extension_point.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 points. """
11
12
13 # Enthought library imports.
14 from traits.api import Instance, Interface, Str, TraitType
15
16
17 class IExtensionPoint(Interface):
18 """The interface for extension points."""
19
20 # A description of what the extension point is and does! (it is called
21 # the slightly dubious, 'desc', instead of 'description', or, to be more
22 # 'Pythonic', maybe 'doc' to match the 'desc' metadata used in traits).
23 desc = Str
24
25 # The extension point's unique identifier.
26 #
27 # Where 'unique' technically means 'unique within the extension registry',
28 # but since the chances are that you will want to include extension points
29 # from external sources, this really means 'globally unique'! Using the
30 # Python package path might be useful here ;^)
31 #
32 # e.g. 'envisage.ui.workbench.views'
33 id = Str
34
35 # A trait type that describes what can be contributed to the extension
36 # point.
37 #
38 # e.g. List(Str)
39 trait_type = Instance(TraitType)