| 1 | /** |
| 2 | * |
| 3 | */ |
| 4 | package de.uka.ipd.sdq.pcmbench.perspectives; |
| 5 | |
| 6 | |
| 7 | import org.eclipse.ui.IFolderLayout; |
| 8 | import org.eclipse.ui.IPageLayout; |
| 9 | import org.eclipse.ui.IPerspectiveFactory; |
| 10 | |
| 11 | |
| 12 | /** |
| 13 | * @author steffen, johann |
| 14 | * |
| 15 | */ |
| 16 | public class ComponentDeveloperPerspective implements IPerspectiveFactory { |
| 17 | |
| 18 | private static final String MAIN_ACTION_SET = "de.uka.ipd.sdq.PCMBench.mainActionSet"; |
| 19 | |
| 20 | private static final String NAVIGATOR_VIEW = "de.uka.ipd.sdq.pcmbench.projectview"; |
| 21 | |
| 22 | /* (non-Javadoc) |
| 23 | * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout) |
| 24 | */ |
| 25 | public void createInitialLayout(IPageLayout layout) { |
| 26 | |
| 27 | String editorArea = layout.getEditorArea(); |
| 28 | layout.setEditorAreaVisible(true); |
| 29 | layout.setFixed(false); |
| 30 | |
| 31 | layout.addPerspectiveShortcut("de.uka.ipd.sdq.pcmbench.componentdeveloper_perspective"); |
| 32 | layout.addPerspectiveShortcut("de.uka.ipd.sdq.pcmbench.softwarearchitect_perspective"); |
| 33 | layout.addPerspectiveShortcut("de.uka.ipd.sdq.pcmbench.deployer_perspective"); |
| 34 | layout.addPerspectiveShortcut("de.uka.ipd.sdq.pcmbench.domainexpert_perspective"); |
| 35 | layout.addPerspectiveShortcut("de.uka.ipd.sdq.pcmbench.qosanalyst_perspective"); |
| 36 | |
| 37 | layout.addActionSet(MAIN_ACTION_SET); |
| 38 | |
| 39 | IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f, editorArea); |
| 40 | IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea); |
| 41 | IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, 0.66f, editorArea); |
| 42 | IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.5f, "topLeft"); |
| 43 | |
| 44 | topLeft.addView(NAVIGATOR_VIEW); |
| 45 | topLeft.addView("org.eclipse.ui.navigator.ProjectExplorer"); |
| 46 | |
| 47 | right.addView(IPageLayout.ID_OUTLINE); |
| 48 | |
| 49 | bottom.addView(IPageLayout.ID_PROP_SHEET); |
| 50 | bottom.addView("org.eclipse.pde.runtime.LogView"); |
| 51 | |
| 52 | |
| 53 | } |
| 54 | |
| 55 | } |