summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorDean Roberts2011-10-18 14:17:17 (EDT)
committer Remy Suen2011-10-18 14:17:17 (EDT)
commiteacc2d2c4501038aa97acab5f7c97c181089d055 (patch)
treec5b2535061bdbb3e3acaaea203120fa5762a2b75
parentb2efb8de7a44aa4cf76c2bf5b9597f535468408e (diff)
downloadeclipse.platform.ui-eacc2d2c4501038aa97acab5f7c97c181089d055.zip
eclipse.platform.ui-eacc2d2c4501038aa97acab5f7c97c181089d055.tar.gz
eclipse.platform.ui-eacc2d2c4501038aa97acab5f7c97c181089d055.tar.bz2
Bug 359438 [Compatibility] Substantial chunk of dead code in
ModeledPageLayout.insert(MUIElement, MUIElement, int, int)
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
index 3ee2722..608fdd3 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/ModeledPageLayout.java
@@ -525,63 +525,6 @@ public class ModeledPageLayout implements IPageLayout {
}
return;
}
-
- /**
- * I will be back later to delete the code below this point because we
- * have statically verified it can never run. This was pointed to by the
- * dead code warning below.
- *
- * Bugzilla 359438
- */
- boolean isStack = true;
-
- // Create the new sash if we're going to need one
- // But neither if clause runs because isStack is true
- MPartSashContainer newSash = null;
- if ((swtSide == SWT.TOP || swtSide == SWT.BOTTOM) && !isStack) {
- newSash = BasicFactoryImpl.eINSTANCE.createPartSashContainer();
- String label = "Vertical Sash[" + toInsert.getElementId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- newSash.setElementId(label);
- newSash.setHorizontal(false);
- } else if ((swtSide == SWT.LEFT || swtSide == SWT.RIGHT) && !isStack) {
- newSash = BasicFactoryImpl.eINSTANCE.createPartSashContainer();
- String label = "Horizontal Sash[" + toInsert.getElementId() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- newSash.setElementId(label);
- newSash.setHorizontal(true);
- }
-
- List parts;
- // At this point relParent is ALLWAYS null because there is a return in
- // the != null case above
- // And we know newSash is always null since the code above to set it is
- // never run.
- if (newSash == null && relParent != null) {
- // So this code would never run
- parts = relParent.getChildren();
- } else {
- // And if this code did run it could only thrown an NPE because
- // newSash is null
- MUIElement vscElement = newSash;
- MElementContainer<MUIElement> container = (MElementContainer<MUIElement>) vscElement;
- insertParent(container, relTo);
- parts = newSash.getChildren();
-
- // List<Integer> weights = newSash.getWeights();
- // weights.add(ratio);
- // weights.add(100 - ratio);
- }
-
- // And this code would never be reached because the above code, if we
- // got there would thrown an NPE.
-
- // Insert the part in the correct location
- int index = parts.indexOf(relTo);
- if (swtSide == SWT.BOTTOM || swtSide == SWT.RIGHT) {
- index++;
-
- }
-
- parts.add(index, toInsert);
}
public static void insert(MUIElement toInsert, MUIElement relTo,