diff options
author | Paul Webster | 2009-05-27 19:12:52 +0000 |
---|---|---|
committer | Paul Webster | 2009-05-27 19:12:52 +0000 |
commit | 279a07e056ef53cd991e06c25aec52d03eeed951 (patch) | |
tree | 430e55a0bed9a85f96920fe196c3c1b62677342b | |
parent | f811a6545918ab3704765ff255f19a62de3cb1df (diff) | |
download | org.eclipse.e4.ui-279a07e056ef53cd991e06c25aec52d03eeed951.tar.gz org.eclipse.e4.ui-279a07e056ef53cd991e06c25aec52d03eeed951.tar.xz org.eclipse.e4.ui-279a07e056ef53cd991e06c25aec52d03eeed951.zip |
Bug 277836 [Compatibility] Setup Compatibility so you can run tests
If there is no bottom folder, create one
-rw-r--r-- | bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/internal/Perspective.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/internal/Perspective.java b/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/internal/Perspective.java index 0cd136a1..e59962e0 100644 --- a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/internal/Perspective.java +++ b/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/internal/Perspective.java @@ -770,6 +770,12 @@ public class Perspective { // Run layout engine. factory.createInitialLayout(layout); + MPart ea = ModeledPageLayout.findPart(persModel, "bottom"); //$NON-NLS-1$ + if (ea == null) { + layout + .createPlaceholderFolder( + "bottom", IPageLayout.BOTTOM, 0.2f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ + } } private void removeAlwaysOn(IActionSetDescriptor descriptor) { @@ -1961,20 +1967,20 @@ public class Perspective { */ public IViewPart showView(String viewId, String secondaryId) throws PartInitException { + // org.eclipse.e4.workbench.ui.internal.Workbench e4Workbench = + // (org.eclipse.e4.workbench.ui.internal.Workbench) ((WorkbenchWindow) + // page + // .getWorkbenchWindow()).getModelWindow().getContext().get( + // org.eclipse.e4.workbench.ui.internal.Workbench.class.getName()); final MPerspective perspectiveModel = ((ModeledPageLayout) layout) .getModel(); MPart ea = ModeledPageLayout.findPart(perspectiveModel, "bottom"); //$NON-NLS-1$ - if (ea == null) { - layout - .createPlaceholderFolder( - "bottom", IPageLayout.BOTTOM, 0.2f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$ - ea = ModeledPageLayout.findPart(perspectiveModel, "bottom"); //$NON-NLS-1$ - } MContributedPart viewModel = ModeledPageLayout.createViewModel(viewId, false); ea.getChildren().add(viewModel); ea.setActiveChild(viewModel); + // e4Workbench.createGUI(viewModel); return (IViewPart) viewModel.getObject(); } |