aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2014-02-13 09:08:04 (EST)
committerGerrit Code Review @ Eclipse.org2014-02-13 10:58:19 (EST)
commitc42d61dbe5ead0fa4bb0f1fc60267d9003ff00d1 (patch)
tree09288b15918a482f4e316f569c7aa5e1d2e4424f
parentf27f2fad5a22a5a415e12dc26aaa474f3a7051cb (diff)
downloadeclipse.platform.ui-c42d61dbe5ead0fa4bb0f1fc60267d9003ff00d1.zip
eclipse.platform.ui-c42d61dbe5ead0fa4bb0f1fc60267d9003ff00d1.tar.gz
eclipse.platform.ui-c42d61dbe5ead0fa4bb0f1fc60267d9003ff00d1.tar.bz2
bug 396318: Save Resources dialog missing when selecting Close All fromrefs/changes/43/21943/2
editor tab Show correct dialog when only one resource needs to be saved. Change-Id: I80f32da12efb95dc42015b5d88834f3433bec59a
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
index 34be555..1f2676a 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
@@ -1472,7 +1472,15 @@ public class StackRenderer extends LazyStackRenderer {
final List<MPart> toPrompt = new ArrayList<MPart>(others);
toPrompt.retainAll(partService.getDirtyParts());
- final Save[] response = saveHandler.promptToSave(toPrompt);
+ final Save[] response;
+ if (toPrompt.size() > 1) {
+ response = saveHandler.promptToSave(toPrompt);
+ } else if (toPrompt.size() == 1) {
+ response = new Save[] { saveHandler.promptToSave(toPrompt
+ .get(0)) };
+ } else {
+ response = new Save[] {};
+ }
final List<MPart> toSave = new ArrayList<MPart>(toPrompt.size());
for (int i = 0; i < response.length; i++) {
final Save save = response[i];