1 package net.sourceforge.phpeclipse.ui;
3 import net.sourceforge.phpeclipse.webbrowser.views.BrowserView;
5 import org.eclipse.debug.ui.IDebugUIConstants;
6 import org.eclipse.search.ui.NewSearchUI;
7 import org.eclipse.ui.IFolderLayout;
8 import org.eclipse.ui.IPageLayout;
9 import org.eclipse.ui.IPerspectiveFactory;
10 import org.eclipse.ui.console.IConsoleConstants;
12 public class PHPPerspectiveFactory implements IPerspectiveFactory {
13 public static final String ID_PROGRESS_VIEW = "org.eclipse.ui.views.ProgressView"; //$NON-NLS-1$
17 public PHPPerspectiveFactory() {
21 public void createInitialLayout(IPageLayout layout) {
22 String editorArea = layout.getEditorArea();
23 IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT,
24 (float) 0.25, editorArea); //$NON-NLS-1$
25 folder.addView(IPageLayout.ID_RES_NAV);
26 IFolderLayout outputfolder = layout.createFolder("bottom",
27 IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
28 outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
30 outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
31 outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
32 outputfolder.addView(IPageLayout.ID_BOOKMARKS);
33 outputfolder.addView(BrowserView.ID_BROWSER);
34 outputfolder.addPlaceholder(ID_PROGRESS_VIEW);
36 layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75,
38 layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
39 layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
40 layout.addShowViewShortcut(BrowserView.ID_BROWSER);
43 layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
46 layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
47 // views - standard workbench
48 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
49 layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
50 layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
51 // new actions - PHP project creation wizards
53 .addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.PHPFileWizard"); //$NON-NLS-1$
55 .addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.NewWizardProjectCreation"); //$NON-NLS-1$
56 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
57 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
58 // perspective shortcuts
59 layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE);
60 layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective");