aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Elder2013-11-14 13:17:51 (EST)
committerPaul Webster2013-11-19 16:06:35 (EST)
commiteb411f692ec4e08f41bd3e0df84d06810b39ede8 (patch)
tree2fed7bf1ede7cc4acc737ccbde8136af8c97a22b
parent0aa6fcb3c3bd2c13d15a96d964d0f0df44f954c7 (diff)
downloadeclipse.platform.ui-eb411f692ec4e08f41bd3e0df84d06810b39ede8.zip
eclipse.platform.ui-eb411f692ec4e08f41bd3e0df84d06810b39ede8.tar.gz
eclipse.platform.ui-eb411f692ec4e08f41bd3e0df84d06810b39ede8.tar.bz2
bug 411465: EditorPart#isSaveOnCloseNeeded() not called when closing
-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 a09e5ae..703bb82 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
@@ -3766,6 +3766,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 168424d..0551c74 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
@@ -529,7 +529,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);