blob: c360d1eca30c804a55f56ba1d70e512b361ff8e0 [file] [log] [blame]
/*
* Created on Dec 7, 2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.eclipse.jst.j2ee.internal.perspective;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
/**
*
* TODO To change the template for this generated type comment go to Window - Preferences - Java -
* Code Style - Code Templates
*/
public class J2EEPerspective implements org.eclipse.ui.IPerspectiveFactory {
protected static String ID_SERVERS_VIEW = "org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
//protected static String ID_J2EE_HIERARCHY_VIEW = "org.eclipse.wst.navigator.ui.WTPCommonNavigator"; //$NON-NLS-1$
protected static String ID_J2EE_HIERARCHY_VIEW = "org.eclipse.wst.navigator.ui.WTPWorkingSetCommonNavigator"; //$NON-NLS-1$
public J2EEPerspective() {
super();
}
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
*/
public void createInitialLayout(IPageLayout layout) {
defineLayout(layout);
defineActions(layout);
}
public void defineActions(IPageLayout layout) {
layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet"); //$NON-NLS-1$
layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet2"); //$NON-NLS-1$
layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet3"); //$NON-NLS-1$
layout.addActionSet("org.eclipse.jst.j2ee.J2eeMainActionSet4"); //$NON-NLS-1$
layout.addActionSet("org.eclipse.jdt.ui.JavaActionSet"); //$NON-NLS-1$
layout.addActionSet("org.eclipse.debug.ui.launchActionSet");//$NON-NLS-1$
layout.addShowViewShortcut(ID_J2EE_HIERARCHY_VIEW);
layout.addShowViewShortcut(ID_SERVERS_VIEW);
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
}
public void defineLayout(IPageLayout layout) {
// Editors are placed for free.
String editorArea = layout.getEditorArea();
// Top left.
IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea);//$NON-NLS-1$
topLeft.addView(ID_J2EE_HIERARCHY_VIEW);
// Bottom left.
IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, (float) 0.66, "topLeft");//$NON-NLS-1$ //$NON-NLS-2$
bottomLeft.addView(IPageLayout.ID_OUTLINE);
// Bottom right.
IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, (float) 0.66, editorArea);//$NON-NLS-1$
bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
bottomRight.addView(IPageLayout.ID_TASK_LIST);
bottomRight.addView(IPageLayout.ID_PROP_SHEET);
bottomRight.addView(ID_SERVERS_VIEW);
}
}