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