Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Moffatt2012-10-22 19:24:55 +0000
committerEric Moffatt2012-10-22 19:26:34 +0000
commitd148d5a39d857d265ad844db90e665bddaa071b5 (patch)
treefdfbcff1e8f1f60c2a453cbbc65d35f0001a9db4 /bundles/org.eclipse.e4.ui.workbench.addons.swt
parent521def6b9597db6acaf013f761fa0a45c1ed839c (diff)
downloadeclipse.platform.ui-d148d5a39d857d265ad844db90e665bddaa071b5.tar.gz
eclipse.platform.ui-d148d5a39d857d265ad844db90e665bddaa071b5.tar.xz
eclipse.platform.ui-d148d5a39d857d265ad844db90e665bddaa071b5.zip
Fix for Bug 384814 - "Fast view" doesn't collapse when clicking on
an empty editor area
Diffstat (limited to 'bundles/org.eclipse.e4.ui.workbench.addons.swt')
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java b/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java
index 2c96111b446..e6ea10d377f 100644
--- a/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java
+++ b/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java
@@ -183,6 +183,23 @@ public class MinMaxAddon {
}
public void mouseDown(MouseEvent e) {
+ // HACK! If this is an empty stack treat it as though it was the editor area
+ // and tear down any open trim stacks (see bug 384814)
+ CTabFolder ctf = (CTabFolder) e.widget;
+ MUIElement element = (MUIElement) ctf.getData(AbstractPartRenderer.OWNING_ME);
+ if (element instanceof MPartStack && ctf.getItemCount() == 0) {
+ MWindow window = modelService.getTopLevelWindowFor(element);
+ if (window != null) {
+ List<MToolControl> tcList = modelService.findElements(window, null,
+ MToolControl.class, null);
+ for (MToolControl tc : tcList) {
+ if (tc.getObject() instanceof TrimStack) {
+ TrimStack ts = (TrimStack) tc.getObject();
+ ts.showStack(false);
+ }
+ }
+ }
+ }
}
private MUIElement getElementToChange(MouseEvent event) {

Back to the top