diff options
author | Stefan Xenos | 2016-01-15 04:10:24 +0000 |
---|---|---|
committer | Stefan Xenos | 2016-01-15 04:10:24 +0000 |
commit | 596e4a6f3d0dac22f668b1e9cc55f43a0e33a1f7 (patch) | |
tree | 4bc27e828ee621f9905aba6345f1f0a4e500e5ba /org.eclipse.ui.workbench.texteditor | |
parent | b39c96b5b9ef219a62925929107ad06c6b1e8c74 (diff) | |
download | eclipse.platform.text-596e4a6f3d0dac22f668b1e9cc55f43a0e33a1f7.tar.gz eclipse.platform.text-596e4a6f3d0dac22f668b1e9cc55f43a0e33a1f7.tar.xz eclipse.platform.text-596e4a6f3d0dac22f668b1e9cc55f43a0e33a1f7.zip |
Bug 485748 - Proactively call done() on progress monitors at the top level
Signed-off-by: Stefan Xenos <sxenos@gmail.com>
Change-Id: Id1deda76707e000651043cae003359730fde1ba5
Diffstat (limited to 'org.eclipse.ui.workbench.texteditor')
-rw-r--r-- | org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java index f9f44148e96..0121690caf4 100644 --- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java +++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2015 IBM Corporation and others. + * Copyright (c) 2000, 2016 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -4697,9 +4697,13 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit if (dialog.open() == 0) { IProgressMonitor pm= getProgressMonitor(); - performSaveAs(pm); - if (pm.isCanceled()) - handleEditorInputChanged(); + try { + performSaveAs(pm); + if (pm.isCanceled()) + handleEditorInputChanged(); + } finally { + pm.done(); + } } else { close(false); } @@ -4755,12 +4759,17 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit */ @Override public void doSaveAs() { - /* - * 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors. - * Changed Behavior to make sure that if called inside a regular save (because - * of deletion of input element) there is a way to report back to the caller. - */ - performSaveAs(getProgressMonitor()); + IProgressMonitor monitor= getProgressMonitor(); + try { + /* + * 1GEUSSR: ITPUI:ALL - User should never loose changes made in the editors. + * Changed Behavior to make sure that if called inside a regular save (because + * of deletion of input element) there is a way to report back to the caller. + */ + performSaveAs(monitor); + } finally { + monitor.done(); + } } /** |