Added changes from David Foerster's automatically generated script. Ref.:
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPPerspectiveFactory.java
1 package net.sourceforge.phpeclipse;
2 import net.sourceforge.phpeclipse.views.browser.BrowserView;
3
4 import org.eclipse.debug.ui.IDebugUIConstants;
5 import org.eclipse.search.ui.SearchUI;
6 import org.eclipse.ui.IFolderLayout;
7 import org.eclipse.ui.IPageLayout;
8 import org.eclipse.ui.IPerspectiveFactory;
9 import org.eclipse.ui.console.IConsoleConstants;
10 //import org.eclipse.update.internal.ui.UpdatePerspective;
11 public class PHPPerspectiveFactory implements IPerspectiveFactory {
12   public PHPPerspectiveFactory() {
13     super();
14   }
15   public void createInitialLayout(IPageLayout layout) {
16     String editorArea = layout.getEditorArea();
17     //          IFolderLayout phpResourcesArea = layout.createFolder("phpresourcesarea",
18     // IPageLayout.LEFT, (float)0.25, editorArea);
19     //          phpResourcesArea.addView(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID);
20     IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT,
21         (float) 0.25, editorArea); //$NON-NLS-1$
22     folder.addView(IPageLayout.ID_RES_NAV);
23     //folder.addPlaceholder(IPageLayout.ID_RES_NAV);
24     IFolderLayout outputfolder = layout.createFolder("bottom",
25         IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
26     outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
27     outputfolder.addPlaceholder(SearchUI.SEARCH_RESULT_VIEW_ID);
28     outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
29     outputfolder.addView(IPageLayout.ID_BOOKMARKS);
30     
31     layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75,
32         editorArea);
33     layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
34     layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
35     layout.addShowViewShortcut(BrowserView.ID_BROWSER);
36     // views - search
37     layout.addShowViewShortcut(SearchUI.SEARCH_RESULT_VIEW_ID);
38     // views - debugging
39     layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
40     // views - standard workbench
41     layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
42     layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
43     layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
44     // new actions - PHP project creation wizards
45     //          layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard");
46     // //$NON-NLS-1$
47     layout
48         .addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.PHPFileWizard"); //$NON-NLS-1$
49     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
50     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
51   }
52 }