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 51 52 53
|
""" The developer plugin. """
# Enthought library imports.
from enthought.envisage.api import Plugin, ServiceOffer
from enthought.traits.api import List
# The package that this module is in.
PKG = '.'.join(__name__.split('.')[:-1])
class DeveloperPlugin(Plugin):
""" The developer plugin.
This plugin contains the non-GUI part of the tools that (hopefully) help
developers to inspect and debug a running Envisage workbench application.
"""
# The Ids of the extension points that this plugin contributes to.
SERVICE_OFFERS = 'enthought.envisage.service_offers'
#### 'IPlugin' interface ##################################################
# The plugin's globally unique identifier.
id = 'enthought.envisage.developer'
# The plugin's name (suitable for displaying to the user).
name = 'Developer'
#### Extension points offered by this plugin ##############################
# None.
#### Contributions to extension points made by this plugin ################
service_offers = List(contributes_to=SERVICE_OFFERS)
def _service_offers_default(self):
""" Trait initializer. """
code_browser_class = PKG + '.code_browser.api.CodeBrowser'
code_browser_service_offer = ServiceOffer(
protocol = code_browser_class,
factory = code_browser_class,
scope = 'application'
)
return [code_browser_service_offer]
#### EOF ######################################################################
|