Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Maeder2003-12-11 15:54:56 +0000
committerThomas Maeder2003-12-11 15:54:56 +0000
commitd6489a8d9d60250e89281e1bb34c653c9d91c15e (patch)
treec59937cf4bcd46852e8f53a021d60738d730a3bb
parent92415c619d47f132de8e3975503c1488db4fe0fc (diff)
downloadeclipse.platform.text-d6489a8d9d60250e89281e1bb34c653c9d91c15e.tar.gz
eclipse.platform.text-d6489a8d9d60250e89281e1bb34c653c9d91c15e.tar.xz
eclipse.platform.text-d6489a8d9d60250e89281e1bb34c653c9d91c15e.zip
fix for bug 47510
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceDialog.java35
1 files changed, 5 insertions, 30 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceDialog.java
index c829d461e8b..e1758d9382a 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceDialog.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/text/ReplaceDialog.java
@@ -128,13 +128,7 @@ class ReplaceDialog extends ExtendedDialogWindow {
protected abstract void doReplace(IProgressMonitor pm) throws BadLocationException, CoreException, IOException;
}
-
- private abstract class ReplaceMarkersRunnable implements Runnable {
- public CoreException fCoreException;
- public BadLocationException fBadLocationException;
- public OperationCanceledException fOperationCanceled;
- }
-
+
// various widget related constants
private static final int REPLACE= IDialogConstants.CLIENT_ID + 1;
private static final int REPLACE_ALL_IN_FILE= IDialogConstants.CLIENT_ID + 2;
@@ -332,7 +326,7 @@ class ReplaceDialog extends ExtendedDialogWindow {
skipFile();
break;
case REPLACE :
- run(true, true, new ReplaceOperation() {
+ run(false, true, new ReplaceOperation() {
protected void doReplace(IProgressMonitor pm) throws BadLocationException, CoreException {
replace(pm, replaceText);
}
@@ -341,7 +335,7 @@ class ReplaceDialog extends ExtendedDialogWindow {
gotoCurrentMarker();
break;
case REPLACE_ALL_IN_FILE :
- run(true, true, new ReplaceOperation() {
+ run(false, true, new ReplaceOperation() {
protected void doReplace(IProgressMonitor pm) throws BadLocationException, CoreException {
replaceInFile(pm, replaceText);
@@ -351,7 +345,7 @@ class ReplaceDialog extends ExtendedDialogWindow {
gotoCurrentMarker();
break;
case REPLACE_ALL :
- run(true, true, new ReplaceOperation() {
+ run(false, true, new ReplaceOperation() {
protected void doReplace(IProgressMonitor pm) throws BadLocationException, CoreException {
replaceAll(pm, replaceText);
}
@@ -409,26 +403,7 @@ class ReplaceDialog extends ExtendedDialogWindow {
private void replaceInFile(final IProgressMonitor pm, final IFile file, final String replacementText, final ReplaceMarker[] markers) throws BadLocationException, CoreException {
if (pm.isCanceled())
throw new OperationCanceledException();
- ReplaceMarkersRunnable rmr= new ReplaceMarkersRunnable() {
- public void run() {
- try {
- doReplaceInFile(pm, file, replacementText, markers);
- } catch (BadLocationException e) {
- fBadLocationException= e;
- } catch (CoreException e) {
- fCoreException= e;
- } catch (OperationCanceledException e) {
- fOperationCanceled= e;
- }
- }
- };
- getShell().getDisplay().syncExec(rmr);
- if (rmr.fCoreException != null)
- throw rmr.fCoreException;
- if (rmr.fBadLocationException != null)
- throw rmr.fBadLocationException;
- if (rmr.fOperationCanceled != null)
- throw rmr.fOperationCanceled;
+ doReplaceInFile(pm, file, replacementText, markers);
}
private void doReplaceInFile(IProgressMonitor pm, IFile file, String replacementText, final ReplaceMarker[] markers) throws BadLocationException, CoreException {

Back to the top