API Reference for Enthought Tool Suite 2.7.1
The plugin definition for the single project plugin.
factory_definition = FactoryDefinition(class_name = (ID + '.project_factory.ProjectFactory'), priority = 0)
The plugin's globally unique identifier (also used as the prefix for all identifiers defined in this module).
ID = 'enthought.envisage.single_project'
IMAGE_PATH = find_definition(ID)
This plugin's UI service referenced within our action contributions.
IPROJECT_UI = ('%s.UiService' mod ID)
The ID used for actions, groups, and menus that apply to the project view control when nothing is selected.
NO_SELECTION_MENU_ID = ('%s.no_selection_menu' mod ID)
PATH_PREFERENCE_PAGE = (ID + '.default_path_preference_page.DefaultPathPreferencePage')
preference_pages = PreferencePages(pages = [ Page(id = PATH_PREFERENCE_PAGE, class_name = PATH_PREFERENCE_PAGE, name = 'Directory', category = '') ])
preferences = Preferences(defaults = { Const('preferred_path') : CallFunc(Getattr(Getattr(Name('os'), 'path'), 'expanduser'), [Const('~')], None, None), Const('autosave_interval') : Const(5) })
The ID used for actions, groups, and menus that apply to projects within the project view.
PROJECT_MENU_ID = ('%s.project_menu' mod ID)
resource_manager = ResourceManager(resource_types = [ ResourceType(class_name = (ID + '.project_resource_type.ProjectResourceType'), precedes = [ ('enthought.envisage.resource.instance_resource_type.' + 'InstanceResourceType') ]) ])
A runnable that opens the first workbench window.
runnable = Runnable(class_name = (ID + '.project_runnable.ProjectRunnable'))
single_project_action_set = SingleProjectActionSet(id = (ID + '.single_project_action_set'), name = 'SingleProjectActionSet', groups = [ Group(id = 'OpenGroup', location = Location(path = 'NoSelectionMenu')), Group(id = 'SaveGroup', location = Location(path = 'NoSelectionMenu', after = 'OpenGroup')), Group(id = 'CloseGroup', location = Location(path = 'NoSelectionMenu', after = 'SaveGroup')), Group(id = 'SaveGroup', location = Location(path = 'ProjectMenu')), Group(id = 'CloseGroup', location = Location(path = 'ProjectMenu', after = 'SaveGroup')) ], actions = [ NewProjectAction(locations = [ Location(path = 'NoSelectionMenu/OpenGroup') ]), OpenProjectAction(locations = [ Location(path = 'NoSelectionMenu/OpenGroup', after = 'NewProject') ]), SaveProjectAction(locations = [ Location(path = 'NoSelectionMenu/SaveGroup'), Location(path = 'ProjectMenu/SaveGroup') ]), SaveAsProjectAction(locations = [ Location(path = 'NoSelectionMenu/SaveGroup', after = 'SaveProject'), Location(path = 'ProjectMenu/SaveGroup', after = 'SaveProject') ]), CloseProjectAction(locations = [ Location(path = 'NoSelectionMenu/CloseGroup'), Location(path = 'ProjectMenu/CloseGroup') ]) ])
ui_service_factory = UIServiceFactory(class_name = (ID + '.ui_service_factory.UIServiceFactory'), priority = 0)
workbench = Workbench(perspectives = [ Perspective(id = (ID + '.perspective.project'), name = 'Project', contents = [ Perspective.Item(id = (ID + '.view.project_view.ProjectView'), position = 'left', width = 0.25), Perspective.Item(id = 'enthought.plugins.python_shell.view.PythonShellView', position = 'bottom', width = 0.75) ]) ], views = [ View(id = (ID + '.view.project_view.ProjectView'), class_name = (ID + '.view.project_view.ProjectView'), image = 'images/view.png', name = 'Current Project', position = 'left') ])
workbench_action_set = WorkbenchActionSet(id = (ID + '.ProjectActionSet'), name = 'Project', groups = [ Group(id = 'PerspectiveGroup', location = Location(path = 'ToolBar')), Group(id = 'ProjectGroup', location = Location(path = 'ToolBar', after = 'PerspectiveGroup')), Group(id = 'ProjectGroup', location = Location(path = 'MenuBar/FileMenu', before = 'ExitGroup')) ], menus = [ Menu(groups = [ Group(id = 'OpenGroup'), Group(id = 'SaveGroup'), Group(id = 'CloseGroup') ], id = 'ProjectMenu', location = Location(path = 'MenuBar/FileMenu/ProjectGroup'), name = '&Project') ], actions = [ NewProjectAction(locations = [ Location(path = 'MenuBar/FileMenu/ProjectMenu/OpenGroup'), Location(path = 'ToolBar/ProjectGroup') ]), OpenProjectAction(locations = [ Location(path = 'MenuBar/FileMenu/ProjectMenu/OpenGroup', after = 'NewProject'), Location(path = 'ToolBar/ProjectGroup', after = 'NewProject') ]), SaveProjectAction(locations = [ Location(path = 'MenuBar/FileMenu/ProjectMenu/SaveGroup'), Location(path = 'ToolBar/ProjectGroup', after = 'OpenProject') ]), SaveAsProjectAction(locations = [ Location(path = 'MenuBar/FileMenu/ProjectMenu/SaveGroup', after = 'SaveProject'), Location(path = 'ToolBar/ProjectGroup', after = 'SaveProject') ]), CloseProjectAction(locations = [ Location(path = 'MenuBar/FileMenu/ProjectMenu/CloseGroup'), Location(path = 'ToolBar/ProjectGroup', after = 'SaveAsProject') ]), Action(class_name = (ID + '.action.switch_to_action.SwitchToAction'), description = 'View the current project in the Project perspective', id = 'SwitchToProject', image = 'switch_project', locations = [ Location(path = 'ToolBar/PerspectiveGroup') ], name = 'Switch To &Project', tooltip = 'Go to the Project perspective') ])
Copyright © 2002-2008 Enthought, Inc.