Exemplo n.º 1
0
 def update_vistrails(self, module, functions):
     self.controller.change_selected_version(self.version)
     action = self.controller.update_functions(module, functions)
     if action is not None:
         window = get_vistrails_application().uvcdatWindow
         window.get_current_project_controller().cell_was_changed(action)
         self.controller.execute_current_workflow()
Exemplo n.º 2
0
 def update_functions(self, module_name, functions):
     #// @todo: Check with Ben if this is the right way to do it:        
     import api            
     controller = api.get_current_controller()
     module = PlotPipelineHelper.find_module_by_name(controller.current_pipeline, module_name)            
     action = controller.update_functions(module, functions)        
     if action is not None:
         window = get_vistrails_application().uvcdatWindow
         window.get_current_project_controller().cell_was_changed(action)
def get_vistrails_temp_configuration():
    """get_vistrails_temp_configuration() -> ConfigurationObject or None
    Returns the temp configuration of the application. It returns None if
    configuration was not found (when running as a bogus application
    for example. The temp configuration is the one that is used just for the
    current session and is not persistent. To make changes persistent, 
    use get_vistrails_persistent_configuration() instead.
    
    """
    from core.application import get_vistrails_application
    app = get_vistrails_application()
    if hasattr(app, 'temp_configuration'):
        return app.temp_configuration
    else:
        return None
def get_vistrails_persistent_configuration():
    """get_vistrails_persistent_configuration() -> ConfigurationObject or None
    Returns the persistent configuration of the application. It returns None if
    configuration was not found (when running as a bogus application
    for example.
    Notice that this function should be use only to write configurations to
    the user's startup.xml file. Otherwise, use get_vistrails_configuration  or
    get_vistrails_temp_configuration.

    """
    from core.application import get_vistrails_application
    app = get_vistrails_application()
    if hasattr(app, 'configuration'):
        return app.configuration
    else:
        return None