Ejemplo n.º 1
0
def main():
    """The main application is created and launched here."""
    # Setup the logger.
    
    plugins = [CorePlugin(),
               WorkbenchPlugin(),
               MyPlugin(),
               ScenePlugin(),
               SceneUIPlugin(),
               BrowserPlugin(),
               PythonShellPlugin(),
               ]
    # Create an Envisage application.
    id = 'enthought.tvtk.examples.plugins.test'
    application = WorkbenchApplication(id=id,
                                       plugins = plugins 
                                       )
    # This needs to be done here since the ETSConfig.application_home is
    # not set correctly up to this point.
    setup_logger(logger, 'test.log', mode=logging.DEBUG)

    application.gui.on_trait_change(lambda value: bind_object(value, application), 
                                    'started')
    # Start the application.
    application.run()
def start_using_workbench_application():
    """ Run the application. """

    from enthought.envisage.ui.workbench.api import WorkbenchApplication
    # Enthought plugins.
    from enthought.envisage.core_plugin import CorePlugin
    from enthought.envisage.developer.developer_plugin import DeveloperPlugin
    from enthought.envisage.developer.ui.developer_ui_plugin import DeveloperUIPlugin
    from enthought.envisage.ui.workbench.workbench_plugin import WorkbenchPlugin
    from enthought.envisage.ui.single_project.project_plugin import ProjectPlugin
    from enthought.envisage.ui.workbench.api import WorkbenchApplication
    from enthought.plugins.python_shell.python_shell_plugin import PythonShellPlugin

    plugins = mayavi_app.get_plugins()
    
    # Create an application with the specified plugins.
    application = WorkbenchApplication(
        plugins=[
#            CorePlugin(), WorkbenchPlugin(), 
            MyModelUIPlugin(),
        ] + plugins
    )

    # Run it! This starts the application, starts the GUI event loop, and when
    # that terminates, stops the application.
    application.run()

    return
def start_using_workbench_application():
    """ Run the application. """

    from enthought.envisage.ui.workbench.api import WorkbenchApplication

    # Create an application with the specified plugins.
    application = WorkbenchApplication(plugins=[CorePlugin(), WorkbenchPlugin(), MyModelUIPlugin()])

    # Run it! This starts the application, starts the GUI event loop, and when
    # that terminates, stops the application.
    application.run()

    return
Ejemplo n.º 4
0
def main():

    # Get the default mayavi plugins.
    plugins = get_plugins()
    # Inject our plugin up front so our perspective becomes the default.
    plugins.insert(0, ExplorerPlugin())

    # Create an Envisage application.
    id = 'explorer3d.Explorer3D'
    application = WorkbenchApplication(id=id, plugins=plugins)
    # This needs to be done here since the ETSConfig.application_home is
    # not set correctly up to this point.
    setup_logger(logger, 'explorer3d.log', mode=logging.ERROR)

    # Start the application.
    application.run()
Ejemplo n.º 5
0
def main():

    # Get the default mayavi plugins.
    plugins = get_plugins()
    # Inject our plugin up front so our perspective becomes the default.
    plugins.insert(0, ExplorerPlugin())
    # plugins = [ ExplorerPlugin() ]

    # Create an Envisage application.
    id = "explorer3d.Explorer3D"
    application = WorkbenchApplication(id=id, plugins=plugins)
    # This needs to be done here since the ETSConfig.application_home is
    # not set correctly up to this point.
    setup_logger(logger, "explorer3d.log", mode=logging.ERROR)

    # Start the application.
    application.run()
Ejemplo n.º 6
0
def main():
    from enthought.envisage.core_plugin import CorePlugin
    from enthought.envisage.ui.workbench.workbench_plugin import WorkbenchPlugin
    from enthought.logger.plugin.logger_plugin import LoggerPlugin
    from enthought.plugins.python_shell.python_shell_plugin import PythonShellPlugin
    plugins = [
        CorePlugin(),
        WorkbenchPlugin(),
        LoggerPlugin(),
        PythonShellPlugin(),
        LoggerDemoPlugin(),
    ]
    app = WorkbenchApplication(
        id='enthought.logger.demo',
        name='Logger Demo',
        plugins=plugins,
    )
    app.run()
Ejemplo n.º 7
0
def main():
    from enthought.envisage.core_plugin import CorePlugin
    from enthought.envisage.ui.workbench.workbench_plugin import WorkbenchPlugin
    from enthought.logger.plugin.logger_plugin import LoggerPlugin
    from enthought.plugins.python_shell.python_shell_plugin import PythonShellPlugin
    plugins = [
        CorePlugin(),
        WorkbenchPlugin(),
        LoggerPlugin(),
        PythonShellPlugin(),
        LoggerDemoPlugin(),
    ]
    app = WorkbenchApplication(
        id='enthought.logger.demo',
        name='Logger Demo',
        plugins=plugins,
    )
    app.run()
Ejemplo n.º 8
0
def main():
    """The main application is created and launched here."""
    # Setup the logger.

    plugins = [
        CorePlugin(),
        WorkbenchPlugin(),
        MyPlugin(),
        ScenePlugin(),
        SceneUIPlugin(),
        BrowserPlugin(),
        PythonShellPlugin(),
    ]
    # Create an Envisage application.
    id = 'enthought.tvtk.examples.plugins.test'
    application = WorkbenchApplication(id=id, plugins=plugins)
    # This needs to be done here since the ETSConfig.application_home is
    # not set correctly up to this point.
    setup_logger(logger, 'test.log', mode=logging.DEBUG)

    application.gui.on_trait_change(
        lambda value: bind_object(value, application), 'started')
    # Start the application.
    application.run()
Ejemplo n.º 9
0
def main():
    application = WorkbenchApplication(name = 'my IDE',
                                       id = 'practice.envisage.myide',
                                       plugins=plugins)
    application.run()
Ejemplo n.º 10
0
# Standard library imports.
import logging

# Enthought library imports.
from enthought.envisage.ui.workbench.api import WorkbenchApplication
from enthought.envisage.core_plugin import CorePlugin
from enthought.envisage.ui.workbench.workbench_plugin import WorkbenchPlugin
from enthought.plugins.ipython_shell.ipython_shell_plugin import IPythonShellPlugin

# Local imports
from dow_plugin import DowPlugin
from dow_ui_plugin import DowUIPlugin

# Logging.
logger = logging.getLogger()
logger.addHandler(logging.StreamHandler(file('dow_application.log', 'w')))
logger.setLevel(logging.DEBUG)

application = WorkbenchApplication(id='dow.application', name='Dow application',
    plugins=[
        CorePlugin(),
        WorkbenchPlugin(),
        IPythonShellPlugin(),
        DowPlugin(),
        DowUIPlugin(),
    ])
application.run()