aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2013-11-14 13:17:51 (EST)
committerGerrit Code Review @ Eclipse.org2013-11-19 16:05:53 (EST)
commit2a663db0ec8b5526b9ed1c61e6a793b495110234 (patch)
treebb839c0232dd5524f77d942955e98d023e968686
parent6640e68957c1e5a8d211bf595d575c7ed2bbb3a8 (diff)
downloadeclipse.platform.ui-2a663db0ec8b5526b9ed1c61e6a793b495110234.zip
eclipse.platform.ui-2a663db0ec8b5526b9ed1c61e6a793b495110234.tar.gz
eclipse.platform.ui-2a663db0ec8b5526b9ed1c61e6a793b495110234.tar.bz2
bug 411465: EditorPart#isSaveOnCloseNeeded() not called when closing refs/changes/98/18398/2
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java3
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
index ac4708e..4278b85 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java
@@ -3757,6 +3757,9 @@ public class WorkbenchPage extends CompatibleWorkbenchPage implements
*/
public boolean saveSaveable(ISaveablePart saveable, IWorkbenchPart part, boolean confirm,
boolean closing) {
+ if (closing && !saveable.isSaveOnCloseNeeded()) {
+ return true;
+ }
return SaveableHelper.savePart(saveable, part, legacyWindow, confirm);
}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
index d4bcf4e..84cb75f 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java
@@ -533,7 +533,7 @@ public class WorkbenchWindow implements IWorkbenchWindow {
IWorkbenchPart workbenchPart = ((CompatibilityPart) object).getPart();
if (workbenchPart instanceof ISaveablePart) {
ISaveablePart saveablePart = (ISaveablePart) workbenchPart;
- return page.saveSaveable(saveablePart, workbenchPart, confirm, false);
+ return page.saveSaveable(saveablePart, workbenchPart, confirm, true);
}
}
return super.save(dirtyPart, confirm);