Added some examples for context menu on Outline
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / PHPPerspectiveFactory.java
1 package net.sourceforge.phpeclipse;
2
3 import net.sourceforge.phpeclipse.webbrowser.views.BrowserView;
4
5 import org.eclipse.debug.ui.IDebugUIConstants;
6 import org.eclipse.search.ui.NewSearchUI;
7 import org.eclipse.ui.IFolderLayout;
8 import org.eclipse.ui.IPageLayout;
9 import org.eclipse.ui.IPerspectiveFactory;
10 import org.eclipse.ui.console.IConsoleConstants;
11 import org.eclipse.core.internal.content.ContentType;
12 //import org.eclipse.update.internal.ui.UpdatePerspective;
13 public class PHPPerspectiveFactory implements IPerspectiveFactory {
14   public static final String ID_PROGRESS_VIEW= "org.eclipse.ui.views.ProgressView"; // see bug 63563  //$NON-NLS-1$
15
16   public PHPPerspectiveFactory() {
17     super();
18   }
19
20   public void createInitialLayout(IPageLayout layout) {
21     String editorArea = layout.getEditorArea();
22     //          IFolderLayout phpResourcesArea = layout.createFolder("phpresourcesarea",
23     // IPageLayout.LEFT, (float)0.25, editorArea);
24     //          phpResourcesArea.addView(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID);
25     IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT,
26         (float) 0.25, editorArea); //$NON-NLS-1$
27     folder.addView(IPageLayout.ID_RES_NAV);
28     //folder.addPlaceholder(IPageLayout.ID_RES_NAV);
29     IFolderLayout outputfolder = layout.createFolder("bottom",
30         IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
31     outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
32
33     outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
34     outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
35     outputfolder.addView(IPageLayout.ID_BOOKMARKS);
36     outputfolder.addView(BrowserView.ID_BROWSER);
37     outputfolder.addPlaceholder(ID_PROGRESS_VIEW);
38
39     layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75,
40         editorArea);
41     layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
42     layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
43     layout.addShowViewShortcut(BrowserView.ID_BROWSER);
44
45     //  views - search
46     layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
47
48     // views - debugging
49     layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
50     // views - standard workbench
51     layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
52     layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
53     layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
54     // new actions - PHP project creation wizards
55     //          layout.addNewWizardShortcut("net.sourceforge.phpdt.ui.wizards.NewInterfaceCreationWizard");
56     // //$NON-NLS-1$
57     layout
58         .addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.PHPFileWizard"); //$NON-NLS-1$
59     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
60     layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
61   }
62 }