Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Xenos2016-01-15 04:10:24 +0000
committerStefan Xenos2016-01-15 04:10:24 +0000
commit596e4a6f3d0dac22f668b1e9cc55f43a0e33a1f7 (patch)
tree4bc27e828ee621f9905aba6345f1f0a4e500e5ba /org.eclipse.ui.editors
parentb39c96b5b9ef219a62925929107ad06c6b1e8c74 (diff)
downloadeclipse.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.editors')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
index 0545ac4de..04dfd8f97 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
@@ -1670,7 +1670,12 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
if (returnCode == saveAsUTF8ButtonId) {
((IStorageDocumentProvider)documentProvider).setEncoding(getEditorInput(), "UTF-8"); //$NON-NLS-1$
- doSave(getProgressMonitor());
+ IProgressMonitor monitor= getProgressMonitor();
+ try {
+ doSave(monitor);
+ } finally {
+ monitor.done();
+ }
} else if (returnCode == selectUnmappableCharButtonId) {
CharsetEncoder encoder= charset.newEncoder();
IDocument document= getDocumentProvider().getDocument(getEditorInput());

Back to the top