diff options
author | Andre Weinand | 2003-05-22 13:48:52 +0000 |
---|---|---|
committer | Andre Weinand | 2003-05-22 13:48:52 +0000 |
commit | d64bc0dc96aecca7715cf5903f06dde6e849998c (patch) | |
tree | bef35306842cea4da4d9687805ed7e31af0e08a4 /bundles/org.eclipse.compare | |
parent | a6569bb993d548d929b938bf48a195b96373ebe4 (diff) | |
download | eclipse.platform.team-d64bc0dc96aecca7715cf5903f06dde6e849998c.tar.gz eclipse.platform.team-d64bc0dc96aecca7715cf5903f06dde6e849998c.tar.xz eclipse.platform.team-d64bc0dc96aecca7715cf5903f06dde6e849998c.zip |
fixed #37849
Diffstat (limited to 'bundles/org.eclipse.compare')
4 files changed, 58 insertions, 36 deletions
diff --git a/bundles/org.eclipse.compare/buildnotes_compare.html b/bundles/org.eclipse.compare/buildnotes_compare.html index 9afaaa08e..fc7cc8c6c 100644 --- a/bundles/org.eclipse.compare/buildnotes_compare.html +++ b/bundles/org.eclipse.compare/buildnotes_compare.html @@ -11,6 +11,14 @@ <h1> Eclipse Platform Build Notes<br> Compare</h1> +Eclipse Build Input Mai 27th 2003 + +<h2> +Problem reports fixed</h2> +<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=37849">#37849</a>: "Ignore whitespace" ignores also closing brackets?!?<br> + +<h1> +<hr WIDTH="100%"></h1> Eclipse Build Input March 27th 2003 <h2> diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java index f8c697f11..e27a96cb2 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java @@ -157,35 +157,38 @@ public class DocLineComparator implements ITokenComparator { } return ""; //$NON-NLS-1$ } - + private boolean compare(String s1, String s2) { - int i1= 0; - int i2= 0; int l1= s1.length(); int l2= s2.length(); - char c1= ' '; - char c2= ' '; - while (i1 < l1 || i2 < l2) { - if (i1 < l1) { - c1= s1.charAt(i1); - if (Character.isWhitespace(c1)) { - i1++; - continue; + int c1= 0, c2= 0; + int i1= 0, i2= 0; + + while (c1 != -1) { + + c1= -1; + while (i1 < l1) { + char c= s1.charAt(i1++); + if (! Character.isWhitespace(c)) { + c1= c; + break; } } - if (i2 < l2) { - c2= s2.charAt(i2); - if (Character.isWhitespace(c2)) { - i2++; - continue; + + c2= -1; + while (i2 < l2) { + char c= s2.charAt(i2++); + if (! Character.isWhitespace(c)) { + c2= c; + break; } } + if (c1 != c2) return false; - i1++; - i2++; } return true; } + } 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 9afaaa08e..fc7cc8c6c 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 @@ -11,6 +11,14 @@ <h1> Eclipse Platform Build Notes<br> Compare</h1> +Eclipse Build Input Mai 27th 2003 + +<h2> +Problem reports fixed</h2> +<a href="http://dev.eclipse.org/bugs/show_bug.cgi?id=37849">#37849</a>: "Ignore whitespace" ignores also closing brackets?!?<br> + +<h1> +<hr WIDTH="100%"></h1> Eclipse Build Input March 27th 2003 <h2> diff --git a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java index f8c697f11..e27a96cb2 100644 --- a/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java +++ b/bundles/org.eclipse.compare/plugins/org.eclipse.compare/compare/org/eclipse/compare/internal/DocLineComparator.java @@ -157,35 +157,38 @@ public class DocLineComparator implements ITokenComparator { } return ""; //$NON-NLS-1$ } - + private boolean compare(String s1, String s2) { - int i1= 0; - int i2= 0; int l1= s1.length(); int l2= s2.length(); - char c1= ' '; - char c2= ' '; - while (i1 < l1 || i2 < l2) { - if (i1 < l1) { - c1= s1.charAt(i1); - if (Character.isWhitespace(c1)) { - i1++; - continue; + int c1= 0, c2= 0; + int i1= 0, i2= 0; + + while (c1 != -1) { + + c1= -1; + while (i1 < l1) { + char c= s1.charAt(i1++); + if (! Character.isWhitespace(c)) { + c1= c; + break; } } - if (i2 < l2) { - c2= s2.charAt(i2); - if (Character.isWhitespace(c2)) { - i2++; - continue; + + c2= -1; + while (i2 < l2) { + char c= s2.charAt(i2++); + if (! Character.isWhitespace(c)) { + c2= c; + break; } } + if (c1 != c2) return false; - i1++; - i2++; } return true; } + } |