forked from spring-attic/spring-ide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved Spring perspective to Spring IDE
- Loading branch information
Martin Lippert
committed
Aug 7, 2012
1 parent
acc9289
commit cc8d3c5
Showing
4 changed files
with
174 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+383 Bytes
plugins/org.springframework.ide.eclipse.ui/icons/full/obj16/spring_perspective.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 147 additions & 0 deletions
147
...ork.ide.eclipse.ui/src/org/springframework/ide/eclipse/ui/perspective/StsPerspective.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2012 VMware, Inc. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* VMware, Inc. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.springframework.ide.eclipse.ui.perspective; | ||
|
||
import org.eclipse.debug.ui.IDebugUIConstants; | ||
import org.eclipse.jdt.ui.JavaUI; | ||
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; | ||
import org.eclipse.ui.progress.IProgressConstants; | ||
import org.eclipse.ui.texteditor.templates.TemplatesView; | ||
|
||
/** | ||
* Default perspective for STS | ||
* @author Christian Dupuis | ||
* @author Steffen Pingel | ||
* @version 2.3.0 | ||
*/ | ||
public class StsPerspective implements IPerspectiveFactory { | ||
|
||
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(JavaUI.ID_PACKAGES); | ||
folder.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY); | ||
folder.addPlaceholder("org.eclipse.ui.views.ResourceNavigator"); | ||
folder.addPlaceholder("org.eclipse.ui.navigator.ProjectExplorer"); | ||
layout.addFastView("org.eclipse.jdt.junit.ResultView", (float) 0.25); | ||
layout.addFastView("org.springframework.ide.eclipse.aop.ui.navigator.aopReferenceModelNavigator", (float) 0.25); | ||
layout.addFastView("org.eclipse.contribution.xref.ui.views.XReferenceView", (float) 0.25); | ||
|
||
IFolderLayout serverFolder = layout.createFolder("server", IPageLayout.BOTTOM, (float) 0.80, "left"); | ||
serverFolder.addView("org.eclipse.wst.server.ui.ServersView"); | ||
|
||
IFolderLayout tasklistFolder = layout.createFolder("topright", IPageLayout.RIGHT, (float) 0.75, editorArea); //$NON-NLS-1$ | ||
tasklistFolder.addView("org.eclipse.mylyn.tasks.ui.views.tasks"); | ||
IFolderLayout springFolder = layout.createFolder("spring", IPageLayout.BOTTOM, (float) 0.50, "topright"); | ||
springFolder.addView("org.springframework.ide.eclipse.ui.navigator.springExplorer"); | ||
|
||
IFolderLayout outlineFolder = layout.createFolder("middleright", IPageLayout.BOTTOM, (float) 0.55, "topright"); //$NON-NLS-1$ | ||
outlineFolder.addView(IPageLayout.ID_OUTLINE); | ||
outlineFolder.addPlaceholder(TemplatesView.ID); | ||
|
||
IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.80, editorArea); //$NON-NLS-1$ | ||
outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW); | ||
outputfolder.addView("org.eclipse.ui.views.AllMarkersView"); | ||
outputfolder.addView(IProgressConstants.PROGRESS_VIEW_ID); | ||
outputfolder.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW); | ||
outputfolder.addPlaceholder(IPageLayout.ID_TASK_LIST); | ||
outputfolder.addPlaceholder(JavaUI.ID_JAVADOC_VIEW); | ||
outputfolder.addPlaceholder(JavaUI.ID_SOURCE_VIEW); | ||
outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID); | ||
outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS); | ||
outputfolder.addPlaceholder("com.springsource.sts.ide.metadata.ui.RequestMappingView"); | ||
|
||
outputfolder.addPlaceholder("*"); | ||
|
||
layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET); | ||
layout.addActionSet(JavaUI.ID_ACTION_SET); | ||
layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET); | ||
layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET); | ||
|
||
// actions - add AJDT actions | ||
layout.addActionSet("ajnavigation"); | ||
layout.addActionSet("ajelementCreation"); | ||
|
||
// views - java | ||
layout.addShowViewShortcut(JavaUI.ID_PACKAGES); | ||
layout.addShowViewShortcut(JavaUI.ID_TYPE_HIERARCHY); | ||
layout.addShowViewShortcut(JavaUI.ID_SOURCE_VIEW); | ||
layout.addShowViewShortcut(JavaUI.ID_JAVADOC_VIEW); | ||
|
||
// 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("org.eclipse.ui.views.AllMarkersView"); | ||
// TODO e3.5 replace with IPageLayout.ID_PROJECT_EXPLORER | ||
layout.addShowViewShortcut("org.eclipse.ui.navigator.ProjectExplorer"); | ||
// layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); | ||
layout.addShowViewShortcut(IProgressConstants.PROGRESS_VIEW_ID); | ||
layout.addShowViewShortcut(TemplatesView.ID); | ||
|
||
// views - springsource views | ||
layout.addShowViewShortcut("com.springsource.sts.ide.metadata.ui.RequestMappingView"); | ||
layout.addShowViewShortcut("org.springframework.ide.eclipse.aop.ui.navigator.aopReferenceModelNavigator"); | ||
layout.addShowViewShortcut("com.springsource.sts.roo.ui.rooShellView"); | ||
layout.addShowViewShortcut("org.springframework.ide.eclipse.aop.ui.tracing.eventTraceView"); | ||
layout.addShowViewShortcut("org.eclipse.contribution.xref.ui.views.XReferenceView"); | ||
layout.addShowViewShortcut("org.eclipse.mylyn.tasks.ui.views.tasks"); | ||
layout.addShowViewShortcut("org.eclipse.wst.server.ui.ServersView"); | ||
|
||
// new files | ||
layout.addNewWizardShortcut("ajaspectwizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewPackageCreationWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewClassCreationWizard"); //$NON-NLS-1$ | ||
// layout.addNewWizardShortcut("org.codehaus.groovy.eclipse.ui.groovyClassWizard");//$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewInterfaceCreationWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewEnumCreationWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewAnnotationCreationWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.junit.wizards.NewTestCaseCreationWizard");//$NON-NLS-1$ | ||
// layout.addNewWizardShortcut("org.codehaus.groovy.eclipse.ui.groovyJUnitWizard");//$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSourceFolderCreationWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewSnippetFileCreationWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.NewJavaWorkingSetWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("org.springframework.ide.eclipse.beans.ui.wizards.newBeansConfig"); | ||
layout.addNewWizardShortcut("org.springframework.ide.eclipse.webflow.ui.wizard.newWebflowConfigWizard"); | ||
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$ | ||
|
||
// new projects | ||
layout.addNewWizardShortcut("org.eclipse.jdt.ui.wizards.JavaProjectWizard"); //$NON-NLS-1$ | ||
layout.addNewWizardShortcut("ajprojectwizard"); | ||
layout.addNewWizardShortcut("com.springsource.sts.wizard.template"); | ||
layout.addNewWizardShortcut("org.springframework.ide.eclipse.beans.ui.wizards.newSpringProject"); | ||
layout.addNewWizardShortcut("com.springsource.sts.roo.ui.wizard.newRooProjectWizard"); | ||
// layout.addNewWizardShortcut("org.codehaus.groovy.eclipse.ui.groovyProjectWizard"); | ||
layout.addNewWizardShortcut("org.grails.ide.eclipse.ui.wizard.newGrailsProjectWizard"); | ||
layout.addNewWizardShortcut("org.eclipse.wst.web.ui.internal.wizards.SimpleWebProjectWizard"); | ||
layout.addNewWizardShortcut("org.eclipse.jst.servlet.ui.project.facet.WebProjectWizard"); | ||
|
||
// new perspectives | ||
layout.addPerspectiveShortcut("org.eclipse.jdt.ui.JavaPerspective"); | ||
layout.addPerspectiveShortcut("org.eclipse.debug.ui.DebugPerspective"); | ||
layout.addPerspectiveShortcut("org.eclipse.jdt.ui.JavaHierarchyPerspective"); | ||
layout.addPerspectiveShortcut("org.eclipse.jdt.ui.JavaBrowsingPerspective"); | ||
layout.addPerspectiveShortcut("org.grails.ide.eclipse.perspective"); | ||
|
||
} | ||
} |