1 11 package org.eclipse.jdt.internal.ui; 12 13 import org.eclipse.debug.ui.IDebugUIConstants; 14 import org.eclipse.jdt.ui.JavaUI; 15 import org.eclipse.search.ui.NewSearchUI; 16 import org.eclipse.ui.IFolderLayout; 17 import org.eclipse.ui.IPageLayout; 18 import org.eclipse.ui.IPerspectiveFactory; 19 import org.eclipse.ui.console.IConsoleConstants; 20 import org.eclipse.ui.progress.IProgressConstants; 21 22 public class JavaPerspectiveFactory implements IPerspectiveFactory { 23 24 27 public JavaPerspectiveFactory() { 28 super(); 29 } 30 31 public void createInitialLayout(IPageLayout layout) { 32 String editorArea = layout.getEditorArea(); 33 34 IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); folder.addView(JavaUI.ID_PACKAGES); 36 folder.addView(JavaUI.ID_TYPE_HIERARCHY); 37 folder.addPlaceholder(IPageLayout.ID_RES_NAV); 38 39 IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); 41 outputfolder.addView(JavaUI.ID_JAVADOC_VIEW); 42 outputfolder.addView(JavaUI.ID_SOURCE_VIEW); 43 outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); 44 outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); 45 outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); 46 outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); 47 48 layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea); 49 50 layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); 51 layout.addActionSet(JavaUI.ID_ACTION_SET); 52 layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); 53 layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); 54 55 layout.addShowViewShortcut(JavaUI.ID_PACKAGES); 57 layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY); 58 layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW); 59 layout.addShowViewShortcut(JavaUI.ID_JAVADOC_VIEW); 60 61 layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); 63 64 layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); 66 67 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); 69 layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); 70 layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); 71 layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); 72 layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); 73 74 layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard"); } 87 } 88 | Popular Tags |