use common ID_SCRIPT_EXPLORER constant
diff --git a/plugins/org.eclipse.dltk.python.ui/src/org/eclipse/dltk/python/ui/PythonPerspective.java b/plugins/org.eclipse.dltk.python.ui/src/org/eclipse/dltk/python/ui/PythonPerspective.java index 4580d59..4f32524 100644 --- a/plugins/org.eclipse.dltk.python.ui/src/org/eclipse/dltk/python/ui/PythonPerspective.java +++ b/plugins/org.eclipse.dltk.python.ui/src/org/eclipse/dltk/python/ui/PythonPerspective.java
@@ -9,55 +9,58 @@ *******************************************************************************/ package org.eclipse.dltk.python.ui; - +import org.eclipse.dltk.ui.DLTKUIPlugin; import org.eclipse.ui.IFolderLayout; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; import org.eclipse.ui.console.IConsoleConstants; import org.eclipse.ui.progress.IProgressConstants; -public class PythonPerspective implements IPerspectiveFactory { +public class PythonPerspective implements IPerspectiveFactory { public void createInitialLayout(IPageLayout layout) { String editorArea = layout.getEditorArea(); - - IFolderLayout folder= layout.createFolder("left", IPageLayout.LEFT, (float)0.2, editorArea); //$NON-NLS-1$ - //folder.addView(PythonUI.ID_PACKAGES); - //folder.addView(PythonUI.ID_TYPE_HIERARCHY); - //folder.addView("org.eclipse.dltk.python.ui.views.navigator");//IPageLayout.ID_RES_NAV); - //String navigator = IPageLayout.ID_RES_NAV; - String navigator = "org.eclipse.dltk.ui.ScriptExplorer"; - folder.addView(navigator); + IFolderLayout folder = layout.createFolder( + "left", IPageLayout.LEFT, (float) 0.2, editorArea); //$NON-NLS-1$ + // folder.addView(PythonUI.ID_PACKAGES); + // folder.addView(PythonUI.ID_TYPE_HIERARCHY); + // folder.addView("org.eclipse.dltk.python.ui.views.navigator");//IPageLayout.ID_RES_NAV); + // String navigator = IPageLayout.ID_RES_NAV; + + folder.addView(DLTKUIPlugin.ID_SCRIPT_EXPLORER); folder.addPlaceholder(IPageLayout.ID_BOOKMARKS); - - IFolderLayout outputfolder= layout.createFolder("bottom", IPageLayout.BOTTOM, (float)0.75, editorArea); //$NON-NLS-1$ + + IFolderLayout outputfolder = layout.createFolder( + "bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$ outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW); outputfolder.addView(IPageLayout.ID_TASK_LIST); outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW); - + outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW); outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID); - - layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float)0.75, editorArea); - + + layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, + editorArea); + layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); - - + // views - standard workbench layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); - layout.addShowViewShortcut(navigator); + layout.addShowViewShortcut(DLTKUIPlugin.ID_SCRIPT_EXPLORER); layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); - + // new actions - Python project creation wizard - layout.addNewWizardShortcut("org.eclipse.dltk.python.internal.ui.wizards.PythonProjectWizard"); //$NON-NLS-1$ + layout + .addNewWizardShortcut("org.eclipse.dltk.python.internal.ui.wizards.PythonProjectWizard"); //$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$ - layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$ + layout + .addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$ } }