示例#1
0
    def setUp(self):
        super(SpMtxAggregate, self).setUp()

        from astvis import services
        core.registerServices(services.dataflow)
        core.registerServices(services.controlflow)
        core.registerServices(services.references)
        
        self.service = core.getService('DataflowService')
        subprogram = self.astModel.files[0].units[0].subprograms[0]
        cfService = core.getService('ControlflowService')
        self.flowModel = cfService.getModel(subprogram)
示例#2
0
    @Action('show-object-browser', 'Browse objects')
    def openBrowser(self, target, context):
        from astvis.misc.browser import Browser
        if target==None:
            target=self.projects
        self._objectBrowser = Browser('browser', target)

    @Action('main-toggle-tracing', 'Toggle tracing', accel="<Control>t")
    def toggleTracing(self, target, context):
        from astvis.misc import trace
        trace.toggle()

    @Action('main-show-console', 'Show console')
    def _showConsole(self, target, context):
        self._consoleWindow.show_all()

if __name__ == "__main__":
    ui = gtk.UIManager()
    action.manager = action.ActionManager(ui)

    import astvis.services
    core.registerServices(astvis.services)
    
    window = MainWindow(ui)
    accelgroup = ui.get_accel_group()
    window.mainWindow.add_accel_group(accelgroup)

    gtk.main()