moved all junit classes to this CVS module
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPPerspectiveFactory.java
1 package net.sourceforge.phpeclipse;
2
3 import org.eclipse.debug.ui.IDebugUIConstants;
4 import org.eclipse.swt.SWT;
5 import org.eclipse.ui.IFolderLayout;
6 import org.eclipse.ui.IPageLayout;
7 import org.eclipse.ui.IPerspectiveFactory;
8 import org.eclipse.update.internal.ui.UpdatePerspective;
9
10 public class PHPPerspectiveFactory implements IPerspectiveFactory {
11
12   public PHPPerspectiveFactory() {
13     super();
14   }
15
16   public void createInitialLayout(IPageLayout layout) {
17     String editorArea = layout.getEditorArea();
18
19     //          IFolderLayout phpResourcesArea = layout.createFolder("phpresourcesarea", IPageLayout.LEFT, (float)0.25, editorArea);
20     //          phpResourcesArea.addView(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID);
21     IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
22     folder.addView(IPageLayout.ID_RES_NAV);
23     //folder.addPlaceholder(IPageLayout.ID_RES_NAV);
24
25     IFolderLayout consoleArea =
26       layout.createFolder(
27         "consoleArea",
28         IPageLayout.BOTTOM,
29         (float) 0.75,
30         editorArea);
31
32     consoleArea.addView(IPageLayout.ID_TASK_LIST);
33     consoleArea.addView(IDebugUIConstants.ID_CONSOLE_VIEW);
34     if (SWT.getPlatform().equals("win32")) {
35       consoleArea.addView(UpdatePerspective.ID_BROWSER);
36     }
37     consoleArea.addView(IPageLayout.ID_BOOKMARKS);
38
39     layout.addView( 
40       IPageLayout.ID_OUTLINE,
41       IPageLayout.RIGHT,
42       (float) 0.75,
43       editorArea);
44
45     layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
46     layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
47     layout.addActionSet(PHPeclipsePlugin.PHP_CODING_ACTION_SET_ID);
48
49     layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW);
50     if (SWT.getPlatform().equals("win32")) {
51       layout.addShowViewShortcut(UpdatePerspective.ID_BROWSER);
52     }
53
54     // layout.addShowViewShortcut(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID);
55
56     // views - standard workbench
57     layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
58     layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
59     layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
60
61     // new actions - PHP project creation wizards
62     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$
63     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$
64   }
65
66 }