Community
Participate
Working Groups
Created attachment 87979 [details] A screenshot of the cluttered diff Build ID: I20071213-1700 Steps To Reproduce: 1. Toggle the comment of a block of code 2. Compare the two versions More information: The diff-view is cluttered with a lot of "different" braces and some "changed" constants whose name includes an underscore. Expected: Since not a even the spaces/tabs are changed, the only thing to highlight in gray are the comment-markers // on each line.
TokenComparator for Java classes is provided by JDT team. Moving to JDT/UI to comment in the first place.
Indeed. Still an issue in 3.6.
Documentation for preference: "General>Compare/Patch>Text compare>Disable capping when comparing large documents" --- The capping mechanism is used to speed up finding differences in large files. In case where the capping happens the result can either be correct or it can display too many changes, but it never misses any change. Turn this option on, if you prefer a precise result in favour of possibly longer calculation time. --- Sadly that option does not remedy this bug.
With the fix for bug 78063, we started to dive into comments and string literals. The problem is that the JavaTokenComparator considers '(' and ')' as separate tokens, but the basic text TokenComparator considers them as one word (a sequence of uncategorized characters). So, we have a tradeoff between considering line-commented text as commented Java code or as basic text. I changed the implementation to consider line-comments as Java code and removed the workaround for bug 183224: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=33046c38677f637e123e1adedf36dc0b454a85c9