From cfe214b7e4859093ebbff13605cd1ca9480a23ae Mon Sep 17 00:00:00 2001 From: bananeweizen Date: Sun, 15 Jan 2006 14:32:03 +0000 Subject: [PATCH 1/1] added "new PHP project" shortcut to PHP perspective --- .../phpeclipse/PHPPerspectiveFactory.java | 96 ++++++++++---------- 1 files changed, 46 insertions(+), 50 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java index e7352d7..53e8cb7 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPPerspectiveFactory.java @@ -8,55 +8,51 @@ import org.eclipse.ui.IFolderLayout; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; import org.eclipse.ui.console.IConsoleConstants; -import org.eclipse.core.internal.content.ContentType; -//import org.eclipse.update.internal.ui.UpdatePerspective; + public class PHPPerspectiveFactory implements IPerspectiveFactory { - public static final String ID_PROGRESS_VIEW= "org.eclipse.ui.views.ProgressView"; // see bug 63563 //$NON-NLS-1$ - - public PHPPerspectiveFactory() { - super(); - } - - public void createInitialLayout(IPageLayout layout) { - String editorArea = layout.getEditorArea(); - // IFolderLayout phpResourcesArea = layout.createFolder("phpresourcesarea", - // IPageLayout.LEFT, (float)0.25, editorArea); - // phpResourcesArea.addView(PHPeclipsePlugin.PHP_RESOURCES_VIEW_ID); - IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, - (float) 0.25, editorArea); //$NON-NLS-1$ - folder.addView(IPageLayout.ID_RES_NAV); - //folder.addPlaceholder(IPageLayout.ID_RES_NAV); - IFolderLayout outputfolder = layout.createFolder("bottom", - IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$ - outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); - - outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); - outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW); - outputfolder.addView(IPageLayout.ID_BOOKMARKS); - outputfolder.addView(BrowserView.ID_BROWSER); - outputfolder.addPlaceholder(ID_PROGRESS_VIEW); - - layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, - editorArea); - layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); - layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); - layout.addShowViewShortcut(BrowserView.ID_BROWSER); - - // views - search - layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); - - // views - debugging - layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); - // views - standard workbench - layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); - layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); - layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); - // new actions - PHP project creation wizards - // layout.addNewWizardShortcut("net.sourceforge.phpdt.ui.wizards.NewInterfaceCreationWizard"); - // //$NON-NLS-1$ - layout - .addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.PHPFileWizard"); //$NON-NLS-1$ - layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$ - layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ - } + public static final String ID_PROGRESS_VIEW = "org.eclipse.ui.views.ProgressView"; //$NON-NLS-1$ + // see bug 63563 + + public PHPPerspectiveFactory() { + super(); + } + + public void createInitialLayout(IPageLayout layout) { + String editorArea = layout.getEditorArea(); + IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, + (float) 0.25, editorArea); //$NON-NLS-1$ + folder.addView(IPageLayout.ID_RES_NAV); + IFolderLayout outputfolder = layout.createFolder("bottom", + IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$ + outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); + + outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); + outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW); + outputfolder.addView(IPageLayout.ID_BOOKMARKS); + outputfolder.addView(BrowserView.ID_BROWSER); + outputfolder.addPlaceholder(ID_PROGRESS_VIEW); + + layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, + editorArea); + layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); + layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); + layout.addShowViewShortcut(BrowserView.ID_BROWSER); + + // views - search + layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID); + + // views - debugging + layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); + // views - standard workbench + layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); + layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); + layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); + // new actions - PHP project creation wizards + layout + .addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.PHPFileWizard"); //$NON-NLS-1$ + layout + .addNewWizardShortcut("net.sourceforge.phpeclipse.wizards.NewWizardProjectCreation"); //$NON-NLS-1$ + layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$ + layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$ + } } \ No newline at end of file -- 1.7.1