diff options
| author | Paul Elder | 2013-11-14 18:17:51 +0000 |
|---|---|---|
| committer | Gerrit Code Review @ Eclipse.org | 2013-11-19 21:05:53 +0000 |
| commit | 2a663db0ec8b5526b9ed1c61e6a793b495110234 (patch) | |
| tree | bb839c0232dd5524f77d942955e98d023e968686 | |
| parent | 6640e68957c1e5a8d211bf595d575c7ed2bbb3a8 (diff) | |
| download | eclipse.platform.ui-2a663db0ec8b5526b9ed1c61e6a793b495110234.tar.gz eclipse.platform.ui-2a663db0ec8b5526b9ed1c61e6a793b495110234.tar.xz eclipse.platform.ui-2a663db0ec8b5526b9ed1c61e6a793b495110234.zip | |
bug 411465: EditorPart#isSaveOnCloseNeeded() not called when closing
Change-Id: I03b7cb331dad3fde7ea04acdd42963c8cf41e40a
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPage.java | 3 | ||||
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java | 2 |
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 ac4708e3224..4278b85cec9 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 d4bcf4ee9e9..84cb75fc57a 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); |
