1 11 package org.eclipse.debug.internal.ui; 12 13 14 import org.eclipse.debug.ui.IDebugUIConstants; 15 import org.eclipse.ui.IFolderLayout; 16 import org.eclipse.ui.IPageLayout; 17 import org.eclipse.ui.IPerspectiveFactory; 18 import org.eclipse.ui.console.IConsoleConstants; 19 20 23 public class DebugPerspectiveFactory implements IPerspectiveFactory { 24 25 28 public void createInitialLayout(IPageLayout layout) { 29 30 IFolderLayout consoleFolder = layout.createFolder(IInternalDebugUIConstants.ID_CONSOLE_FOLDER_VIEW, IPageLayout.BOTTOM, (float)0.75, layout.getEditorArea()); 31 consoleFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW); 32 consoleFolder.addView(IPageLayout.ID_TASK_LIST); 33 consoleFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); 34 consoleFolder.addPlaceholder(IPageLayout.ID_PROP_SHEET); 35 36 IFolderLayout navFolder= layout.createFolder(IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW, IPageLayout.TOP, (float) 0.45, layout.getEditorArea()); 37 navFolder.addView(IDebugUIConstants.ID_DEBUG_VIEW); 38 navFolder.addPlaceholder(IPageLayout.ID_RES_NAV); 39 40 IFolderLayout toolsFolder= layout.createFolder(IInternalDebugUIConstants.ID_TOOLS_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.50, IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW); 41 toolsFolder.addView(IDebugUIConstants.ID_VARIABLE_VIEW); 42 toolsFolder.addView(IDebugUIConstants.ID_BREAKPOINT_VIEW); 43 toolsFolder.addPlaceholder(IDebugUIConstants.ID_EXPRESSION_VIEW); 44 toolsFolder.addPlaceholder(IDebugUIConstants.ID_REGISTER_VIEW); 45 46 IFolderLayout outlineFolder= layout.createFolder(IInternalDebugUIConstants.ID_OUTLINE_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.75, layout.getEditorArea()); 47 outlineFolder.addView(IPageLayout.ID_OUTLINE); 48 49 layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); 50 layout.addActionSet(IDebugUIConstants.DEBUG_ACTION_SET); 51 52 setContentsOfShowViewMenu(layout); 53 } 54 55 58 protected void setContentsOfShowViewMenu(IPageLayout layout) { 59 layout.addShowViewShortcut(IDebugUIConstants.ID_DEBUG_VIEW); 60 layout.addShowViewShortcut(IDebugUIConstants.ID_VARIABLE_VIEW); 61 layout.addShowViewShortcut(IDebugUIConstants.ID_BREAKPOINT_VIEW); 62 layout.addShowViewShortcut(IDebugUIConstants.ID_EXPRESSION_VIEW); 63 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); 64 layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); 65 layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); 66 } 67 } 68 | Popular Tags |