Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2003-02-04 16:32:09 +0000
committerAndre Weinand2003-02-04 16:32:09 +0000
commit35edf211e8a91a40372c420a269e3daf4ca3c337 (patch)
tree81fbd619da22a122c2a783751d2644a111d1ecfb
parent619ddb12d65256bb5f0f19d32def57f2d1f16e96 (diff)
downloadeclipse.platform.team-35edf211e8a91a40372c420a269e3daf4ca3c337.tar.gz
eclipse.platform.team-35edf211e8a91a40372c420a269e3daf4ca3c337.tar.xz
eclipse.platform.team-35edf211e8a91a40372c420a269e3daf4ca3c337.zip
fixed #28436
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java49
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java49
2 files changed, 54 insertions, 44 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index f3dc4ae31..a2a9bca27 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -3626,33 +3626,37 @@ public class TextMergeViewer extends ContentMergeViewer {
IRewriteTarget target= leftToRight ? fRight.getRewriteTarget() : fLeft.getRewriteTarget();
boolean compoundChangeStarted= false;
Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- switch (diff.fDirection) {
- case RangeDifference.LEFT:
- if (leftToRight) {
- if (!compoundChangeStarted) {
- target.beginCompoundChange();
- compoundChangeStarted= true;
+ try {
+ while (e.hasNext()) {
+ Diff diff= (Diff) e.next();
+ switch (diff.fDirection) {
+ case RangeDifference.LEFT:
+ if (leftToRight) {
+ if (!compoundChangeStarted) {
+ target.beginCompoundChange();
+ compoundChangeStarted= true;
+ }
+ copy(diff, leftToRight, false);
}
- copy(diff, leftToRight, false);
- }
- break;
- case RangeDifference.RIGHT:
- if (!leftToRight) {
- if (!compoundChangeStarted) {
- target.beginCompoundChange();
- compoundChangeStarted= true;
+ break;
+ case RangeDifference.RIGHT:
+ if (!leftToRight) {
+ if (!compoundChangeStarted) {
+ target.beginCompoundChange();
+ compoundChangeStarted= true;
+ }
+ copy(diff, leftToRight, false);
}
- copy(diff, leftToRight, false);
+ break;
+ default:
+ continue;
}
- break;
- default:
- continue;
+ }
+ } finally {
+ if (compoundChangeStarted) {
+ target.endCompoundChange();
}
}
- if (compoundChangeStarted)
- target.endCompoundChange();
}
}
@@ -3788,6 +3792,7 @@ public class TextMergeViewer extends ContentMergeViewer {
}
diff.setResolved(true);
+ updateResolveStatus();
return true;
}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
index f3dc4ae31..a2a9bca27 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java
@@ -3626,33 +3626,37 @@ public class TextMergeViewer extends ContentMergeViewer {
IRewriteTarget target= leftToRight ? fRight.getRewriteTarget() : fLeft.getRewriteTarget();
boolean compoundChangeStarted= false;
Iterator e= fChangeDiffs.iterator();
- while (e.hasNext()) {
- Diff diff= (Diff) e.next();
- switch (diff.fDirection) {
- case RangeDifference.LEFT:
- if (leftToRight) {
- if (!compoundChangeStarted) {
- target.beginCompoundChange();
- compoundChangeStarted= true;
+ try {
+ while (e.hasNext()) {
+ Diff diff= (Diff) e.next();
+ switch (diff.fDirection) {
+ case RangeDifference.LEFT:
+ if (leftToRight) {
+ if (!compoundChangeStarted) {
+ target.beginCompoundChange();
+ compoundChangeStarted= true;
+ }
+ copy(diff, leftToRight, false);
}
- copy(diff, leftToRight, false);
- }
- break;
- case RangeDifference.RIGHT:
- if (!leftToRight) {
- if (!compoundChangeStarted) {
- target.beginCompoundChange();
- compoundChangeStarted= true;
+ break;
+ case RangeDifference.RIGHT:
+ if (!leftToRight) {
+ if (!compoundChangeStarted) {
+ target.beginCompoundChange();
+ compoundChangeStarted= true;
+ }
+ copy(diff, leftToRight, false);
}
- copy(diff, leftToRight, false);
+ break;
+ default:
+ continue;
}
- break;
- default:
- continue;
+ }
+ } finally {
+ if (compoundChangeStarted) {
+ target.endCompoundChange();
}
}
- if (compoundChangeStarted)
- target.endCompoundChange();
}
}
@@ -3788,6 +3792,7 @@ public class TextMergeViewer extends ContentMergeViewer {
}
diff.setResolved(true);
+ updateResolveStatus();
return true;
}

Back to the top