From: robekras Date: Sat, 7 Jan 2012 10:09:49 +0000 (+0000) Subject: 1) Reintroduced PHPPerspectiveFactory (was lost with refactoring). X-Git-Url: http://secure.phpeclipse.com 1) Reintroduced PHPPerspectiveFactory (was lost with refactoring). 2) Fixed typo. --- diff --git a/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF b/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF index cce2280..0d0ab9c 100644 --- a/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF +++ b/net.sourceforge.phpeclipse.ui/META-INF/MANIFEST.MF @@ -71,10 +71,12 @@ Export-Package: net.sourceforge.phpdt.internal.corext.codemanipulation;x-interna Require-Bundle: net.sourceforge.phpeclipse.core, org.eclipse.core.runtime, org.eclipse.jface.text, + org.eclipse.debug.ui, org.eclipse.ui, org.eclipse.ui.editors, org.eclipse.ui.ide, org.eclipse.ui.views, + org.eclipse.ui.console, org.eclipse.ui.workbench.texteditor, net.sourceforge.phpeclipse.webbrowser, net.sourceforge.phpeclipse;bundle-version="0.0.0", @@ -84,4 +86,5 @@ Require-Bundle: net.sourceforge.phpeclipse.core, Bundle-RequiredExecutionEnvironment: J2SE-1.4 Bundle-ActivationPolicy: lazy Import-Package: org.eclipse.ltk.core.refactoring.participants, - org.eclipse.ltk.ui.refactoring + org.eclipse.ltk.ui.refactoring, + org.eclipse.search.ui diff --git a/net.sourceforge.phpeclipse.ui/plugin.xml b/net.sourceforge.phpeclipse.ui/plugin.xml index 706cf5c..1c4259d 100644 --- a/net.sourceforge.phpeclipse.ui/plugin.xml +++ b/net.sourceforge.phpeclipse.ui/plugin.xml @@ -7,7 +7,7 @@ name="%perspectivePHP.name" icon="icons/obj16/php.png" class="net.sourceforge.phpeclipse.ui.PHPPerspectiveFactory" - id="net.sourceforge.phpeclipse.ui.PHPPerspective"> + id="net.sourceforge.phpeclipse.PHPPerspective"> diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/PHPPerspectiveFactory.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/PHPPerspectiveFactory.java new file mode 100644 index 0000000..31a20a2 --- /dev/null +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/PHPPerspectiveFactory.java @@ -0,0 +1,62 @@ +package net.sourceforge.phpeclipse.ui; + +import net.sourceforge.phpeclipse.webbrowser.views.BrowserView; + +import org.eclipse.debug.ui.IDebugUIConstants; +import org.eclipse.search.ui.NewSearchUI; +import org.eclipse.ui.IFolderLayout; +import org.eclipse.ui.IPageLayout; +import org.eclipse.ui.IPerspectiveFactory; +import org.eclipse.ui.console.IConsoleConstants; + +public class PHPPerspectiveFactory implements IPerspectiveFactory { + 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$ + // perspective shortcuts + layout.addPerspectiveShortcut(IDebugUIConstants.ID_DEBUG_PERSPECTIVE); + layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); + } +} \ No newline at end of file diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java index 639f165..9eba696 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/builder/IdentifierIndexManager.java @@ -31,7 +31,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IStatus; /** - * Manages the identifer index information for a specific project + * Manages the identifier index information for a specific project * */ public class IdentifierIndexManager {