ContextHelp now in new module net.sourceforge.phpeclipse.phphelp
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPPerspectiveFactory.java
1
2 package net.sourceforge.phpeclipse;
3
4 import org.eclipse.debug.ui.IDebugUIConstants;
5 import org.eclipse.ui.IFolderLayout;
6 import org.eclipse.ui.IPageLayout;
7 import org.eclipse.ui.IPerspectiveFactory;
8
9 public class PHPPerspectiveFactory implements IPerspectiveFactory {
10
11         public PHPPerspectiveFactory() {
12                 super();
13         }
14
15         public void createInitialLayout(IPageLayout layout) {
16                 String editorArea = layout.getEditorArea();
17                 
18                 IFolderLayout phpResourcesArea = layout.createFolder("phpresourcesarea", IPageLayout.LEFT, (float)0.25, editorArea);
19                 phpResourcesArea.addView(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID);
20                 
21                 IFolderLayout consoleArea = layout.createFolder("consoleArea", IPageLayout.BOTTOM, (float)0.75, editorArea);
22                 
23                 consoleArea.addView(IPageLayout.ID_TASK_LIST);
24     consoleArea.addView(IDebugUIConstants.ID_CONSOLE_VIEW);
25     consoleArea.addPlaceholder(IPageLayout.ID_BOOKMARKS);
26     
27     layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea);
28     
29                 layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
30                 
31                 layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW);
32
33                 layout.addShowViewShortcut(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID);
34     
35     // views - standard workbench
36     layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
37     layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
38     
39     // new actions - PHP project creation wizards
40     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
41     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
42         }
43
44 }