001 package org.meta_environment.eclipse.sdf; 002 003 import org.eclipse.jdt.ui.JavaUI; 004 import org.eclipse.search.ui.NewSearchUI; 005 import org.eclipse.ui.IFolderLayout; 006 import org.eclipse.ui.IPageLayout; 007 import org.eclipse.ui.IPerspectiveFactory; 008 import org.eclipse.ui.console.IConsoleConstants; 009 import org.eclipse.ui.progress.IProgressConstants; 010 011 public class Perspective implements IPerspectiveFactory { 012 013 public void createInitialLayout(IPageLayout layout) { 014 String editorArea = layout.getEditorArea(); 015 016 IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.25, editorArea); //$NON-NLS-1$ 017 folder.addView(JavaUI.ID_PACKAGES); 018 folder.addPlaceholder(IPageLayout.ID_RES_NAV); 019 020 IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$ 021 outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); 022 outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW); 023 outputfolder.addView(NewSearchUI.SEARCH_VIEW_ID); 024 // outputfolder.addView(FactBrowserView.ID); 025 026 IFolderLayout outlineFolder = layout.createFolder("outline", IPageLayout.RIGHT, (float)0.75, editorArea); //$NON-NLS-1$ 027 outlineFolder.addView(IPageLayout.ID_OUTLINE); 028 outlineFolder.addView(IPageLayout.ID_PROGRESS_VIEW); 029 030 layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); 031 032 layout.addShowViewShortcut(JavaUI.ID_PACKAGES); 033 layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW); 034 layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); 035 layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); 036 037 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); 038 layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); 039 layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); 040 layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); 041 layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); 042 043 // new actions - Java project creation wizard 044 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); 045 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); 046 } 047 048 }