summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorEric Moffatt2011-07-19 10:34:04 (EDT)
committer Paul Webster2011-08-25 10:21:55 (EDT)
commitc0525e2445aeb13c6035781cd200afd719f50169 (patch)
tree7c67768bd6968597896eb1dc1a769051ac7a1ebd
parenta678fa8c6f37d70e88a2e02ed426d79e164da489 (diff)
downloadeclipse.platform.ui-c0525e2445aeb13c6035781cd200afd719f50169.zip
eclipse.platform.ui-c0525e2445aeb13c6035781cd200afd719f50169.tar.gz
eclipse.platform.ui-c0525e2445aeb13c6035781cd200afd719f50169.tar.bz2
Fix for Bug 333496 - Rendering engine only shows one part for a
window with two parts
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/SashRenderer.java5
-rw-r--r--tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java1
2 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/SashRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/SashRenderer.java
index d9b1239..2184fc3 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/SashRenderer.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/SashRenderer.java
@@ -98,7 +98,10 @@ public class SashRenderer extends SWTPartRenderer {
public Object createWidget(final MUIElement element, Object parent) {
MUIElement elementParent = element.getParent();
- if (elementParent.getRenderer() == this) {
+ if (elementParent == null && element.getCurSharedRef() != null)
+ elementParent = element.getCurSharedRef();
+
+ if (elementParent != null && elementParent.getRenderer() == this) {
Rectangle newRect = new Rectangle(0, 0, 0, 0);
// If my layout's container gets disposed 'unbind' the sash elements
diff --git a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
index 8f4f369..b626845 100644
--- a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
+++ b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
@@ -1317,6 +1317,7 @@ public class PartRenderingEngineTests extends TestCase {
MPartSashContainer sharedSashContainer = BasicFactoryImpl.eINSTANCE
.createPartSashContainer();
+ window.getSharedElements().add(sharedSashContainer);
sharedAreaPlaceholder.setRef(sharedSashContainer);
sharedSashContainer.setCurSharedRef(sharedAreaPlaceholder);