1 package net.sourceforge.phpeclipse;
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;
10 public class PHPPerspectiveFactory implements IPerspectiveFactory {
12 public PHPPerspectiveFactory() {
16 public void createInitialLayout(IPageLayout layout) {
17 String editorArea = layout.getEditorArea();
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);
25 IFolderLayout consoleArea =
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);
37 consoleArea.addView(IPageLayout.ID_BOOKMARKS);
40 IPageLayout.ID_OUTLINE,
45 layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
46 layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
47 layout.addActionSet(PHPeclipsePlugin.PHP_CODING_ACTION_SET_ID);
49 layout.addShowViewShortcut(IDebugUIConstants.ID_CONSOLE_VIEW);
50 if (SWT.getPlatform().equals("win32")) {
51 layout.addShowViewShortcut(UpdatePerspective.ID_BROWSER);
54 // layout.addShowViewShortcut(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID);
56 // views - standard workbench
57 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
58 layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
59 layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
61 // new actions - PHP project creation wizards
62 // layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$
63 layout.addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.PHPFileWizard"); //$NON-NLS-1$
64 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
65 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$