Пример #1
0
    def refresh ( self ):
        """ Refreshes the contents of the view.
        """
        global get_application

        self.objects = [ dc.object for dc in self.dock_control.dock_controls
                                  if isinstance( dc.object, HasTraits ) ]
        if get_application is not None:
            self.objects.append( get_application() )
        self.set_view_object()
Пример #2
0
    def _get_binding_for ( self, value ):

        result = None

        # FIXME: The following code makes this whole component have a dependency
        # on envisage, and worse, assumes the use of a particular project
        # plugin!  This is horrible and should be refactored out, possibly to
        # a custom sub-class of whoever needs this behavior.
        try:
            from envisage import get_application
            workspace = get_application().service_registry.get_service(
                            'envisage.project.IWorkspace' )
            result = workspace.lookup_binding( value )
        except ImportError:
            pass

        return result
Пример #3
0
    def _get_binding_for(self, value):

        result = None

        # FIXME: The following code makes this whole component have a dependency
        # on envisage, and worse, assumes the use of a particular project
        # plugin!  This is horrible and should be refactored out, possibly to
        # a custom sub-class of whoever needs this behavior.
        try:
            from envisage import get_application
            workspace = get_application().service_registry.get_service(
                'envisage.project.IWorkspace')
            result = workspace.lookup_binding(value)
        except ImportError:
            pass

        return result