Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Moffatt2013-05-13 18:57:39 +0000
committerEric Moffatt2013-05-13 18:57:39 +0000
commitee87a0ccfd77b4375d268a59213699f0d1a8b093 (patch)
tree6113b7a55f9d9fa9acecbfd75747258a6b88940e
parentd7bf7e543636f8f570f7e1e4daedcbd9fed8645e (diff)
downloadeclipse.platform.ui-ee87a0ccfd77b4375d268a59213699f0d1a8b093.tar.gz
eclipse.platform.ui-ee87a0ccfd77b4375d268a59213699f0d1a8b093.tar.xz
eclipse.platform.ui-ee87a0ccfd77b4375d268a59213699f0d1a8b093.zip
Fix for Bug 407377 - CCE when trying to close minimized view via context
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java13
1 files changed, 1 insertions, 12 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java b/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
index 032019321e0..ba35b35890a 100644
--- a/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
+++ b/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
@@ -81,12 +81,6 @@ public class TrimStack {
private static final String RESTORE_ICON_URI = "platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/icons/full/etool16/fastview_restore.gif"; //$NON-NLS-1$
- /**
- * If the minimized shared editor area is empty, the editor area tool item will have this
- * constant as its data.
- */
- private static final Object EMPTY_EDITOR_AREA = new Object();
-
static final String STATE_XSIZE = "XSize"; //$NON-NLS-1$
static final String STATE_YSIZE = "YSize"; //$NON-NLS-1$
@@ -522,7 +516,7 @@ public class TrimStack {
} else if (data instanceof MPerspective) {
// A perspective in a perspective stack (for now we just support restore)
createEmtpyEditorAreaMenu();
- } else if (EMPTY_EDITOR_AREA.equals(data)) {
+ } else if (isEditorStack()) {
// An empty editor area
createEmtpyEditorAreaMenu();
}
@@ -738,14 +732,9 @@ public class TrimStack {
}
if (isEditorStack() && trimStackTB.getItemCount() == 1) {
- Object data = getLeafPart(minimizedElement);
- if (data == null) {
- data = EMPTY_EDITOR_AREA;
- }
ToolItem ti = new ToolItem(trimStackTB, SWT.CHECK);
ti.setToolTipText(Messages.TrimStack_SharedAreaTooltip);
ti.setImage(getLayoutImage());
- ti.setData(data);
ti.addSelectionListener(toolItemSelectionListener);
} else if (minimizedElement instanceof MGenericStack<?>) {
// Handle *both* PartStacks and PerspectiveStacks here...

Back to the top