Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Weinand2002-06-01 08:49:35 +0000
committerAndre Weinand2002-06-01 08:49:35 +0000
commit78603d1ec3036c5e0e8a4f5c1cc242c87db7cf32 (patch)
tree600e7d207f8fce90ba2a9115e18bafee2618a272
parent672c2339999b9a5300555d7c3a65d86bd3517e46 (diff)
downloadeclipse.platform.team-78603d1ec3036c5e0e8a4f5c1cc242c87db7cf32.tar.gz
eclipse.platform.team-78603d1ec3036c5e0e8a4f5c1cc242c87db7cf32.tar.xz
eclipse.platform.team-78603d1ec3036c5e0e8a4f5c1cc242c87db7cf32.zip
#16570: Compare refuses to show further differences if not ignoring whitespaces
-rw-r--r--bundles/org.eclipse.compare/buildnotes_compare.html2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java15
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html2
-rw-r--r--bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/TextMergeViewer.java15
4 files changed, 28 insertions, 6 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html
index 2c9b1bb7e..025fc8537 100644
--- a/bundles/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/buildnotes_compare.html
@@ -39,6 +39,8 @@ Problem reports fixed</h2>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17431">#17431</a>: Accessibility issues<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18148">#18148</a>: Using combinations of No and Next file button break wrapping<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18151">#18151</a>: Next File button does not ding when on last file<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16570">#16570</a>: Compare refuses to show further differences if not ignoring whitespaces<br>
+
<h2>
Problem reports closed</h2>
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 683f48e1c..f19349392 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
@@ -2090,9 +2090,18 @@ public class TextMergeViewer extends ContentMergeViewer {
ancestorDoc, null, ancestorStart2, ancestorEnd2,
leftDoc, null, leftStart2, leftEnd2,
rightDoc, null, rightStart2, rightEnd2);
- diff.fIsToken= true;
- // add to base Diff
- baseDiff.add(diff);
+
+ // ensure that token diff is smaller than basediff
+ int leftS= baseDiff.fLeftPos.offset;
+ int leftE= baseDiff.fLeftPos.offset+baseDiff.fLeftPos.length;
+ int rightS= baseDiff.fRightPos.offset;
+ int rightE= baseDiff.fRightPos.offset+baseDiff.fRightPos.length;
+ if (leftS != leftStart2 || leftE != leftEnd2 ||
+ rightS != rightStart2 || rightE != rightEnd2) {
+ diff.fIsToken= true;
+ // add to base Diff
+ baseDiff.add(diff);
+ }
}
}
}
diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
index 2c9b1bb7e..025fc8537 100644
--- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
+++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/buildnotes_compare.html
@@ -39,6 +39,8 @@ Problem reports fixed</h2>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=17431">#17431</a>: Accessibility issues<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18148">#18148</a>: Using combinations of No and Next file button break wrapping<br>
<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=18151">#18151</a>: Next File button does not ding when on last file<br>
+<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=16570">#16570</a>: Compare refuses to show further differences if not ignoring whitespaces<br>
+
<h2>
Problem reports closed</h2>
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 683f48e1c..f19349392 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
@@ -2090,9 +2090,18 @@ public class TextMergeViewer extends ContentMergeViewer {
ancestorDoc, null, ancestorStart2, ancestorEnd2,
leftDoc, null, leftStart2, leftEnd2,
rightDoc, null, rightStart2, rightEnd2);
- diff.fIsToken= true;
- // add to base Diff
- baseDiff.add(diff);
+
+ // ensure that token diff is smaller than basediff
+ int leftS= baseDiff.fLeftPos.offset;
+ int leftE= baseDiff.fLeftPos.offset+baseDiff.fLeftPos.length;
+ int rightS= baseDiff.fRightPos.offset;
+ int rightE= baseDiff.fRightPos.offset+baseDiff.fRightPos.length;
+ if (leftS != leftStart2 || leftE != leftEnd2 ||
+ rightS != rightStart2 || rightE != rightEnd2) {
+ diff.fIsToken= true;
+ // add to base Diff
+ baseDiff.add(diff);
+ }
}
}
}

Back to the top