1 11 12 package org.eclipse.jdt.internal.ui; 13 14 import org.eclipse.debug.ui.IDebugUIConstants; 15 import org.eclipse.jdt.ui.JavaUI; 16 import org.eclipse.search.ui.NewSearchUI; 17 import org.eclipse.ui.IFolderLayout; 18 import org.eclipse.ui.IPageLayout; 19 import org.eclipse.ui.IPerspectiveFactory; 20 import org.eclipse.ui.IPlaceholderFolderLayout; 21 import org.eclipse.ui.console.IConsoleConstants; 22 import org.eclipse.ui.progress.IProgressConstants; 23 24 public class JavaHierarchyPerspectiveFactory implements IPerspectiveFactory { 25 26 29 public JavaHierarchyPerspectiveFactory() { 30 super(); 31 } 32 33 public void createInitialLayout(IPageLayout layout) { 34 String editorArea = layout.getEditorArea(); 35 36 IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); folder.addView(JavaUI.ID_TYPE_HIERARCHY); 38 folder.addPlaceholder(IPageLayout.ID_OUTLINE); 39 folder.addPlaceholder(JavaUI.ID_PACKAGES); 40 folder.addPlaceholder(IPageLayout.ID_RES_NAV); 41 42 IPlaceholderFolderLayout outputfolder= layout.createPlaceholderFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); outputfolder.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW); 44 outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); 45 outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); 46 outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); 47 outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW); 48 outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW); 49 outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); 50 51 layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); 52 layout.addActionSet(JavaUI.ID_ACTION_SET); 53 layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); 54 55 layout.addShowViewShortcut(JavaUI.ID_PACKAGES); 57 layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY); 58 59 layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); 60 61 layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); 63 64 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); 66 layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); 67 layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); 68 layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); 69 layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); 70 71 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"); } 83 } 84 | Popular Tags |