Bug 76299 - [Algorithm] Ignore White Space in CVS Compare ...
Summary: [Algorithm] Ignore White Space in CVS Compare ...
Status: RESOLVED DUPLICATE of bug 203880
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Compare (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-Compare-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-14 15:53 EDT by Marcel Petavy CLA
Modified: 2008-01-29 06:01 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Petavy CLA 2004-10-14 15:53:00 EDT
Hi.

I have a java file. The only between the actual local version and the version in 
CVS is that I have added in a String literal an additional space.
When I do a CVS compare and have enabled the "Ignore White Space" button the CVS 
compare window show me no differences between the two versions.

Suggestion : The "Ignore white space" option should NOT hide changes in String 
literals !

Cheers - Marcel.
Comment 1 Assaf Berg CLA 2004-11-07 04:36:56 EST
Yes, this happens in 3.1M2 and is quite annoying
Comment 2 Andre Weinand CLA 2004-11-07 12:07:54 EST
Works as designed: the "ignore white space" option of the text compare isn't Java aware.
However, I agree it would be a useful feature to have.
But it is hard to implement right because the text differencing algorithm is line oriented and not token 
oriented.
Comment 3 Assaf Berg CLA 2004-11-07 16:33:30 EST
Only spaces in the beginning and end of the line should be considered as white 
space to ignore. Spaces in the middle of the line should not.
Comment 4 Andre Weinand CLA 2004-11-07 18:22:52 EST
No, ignoring only leading or trailing white space is not that helpful in light of formatting changes wihin 
a line. 
I prefer to have whitespace in strings not showing up in text compare, but seeing it in the (Java aware) 
structure compare.
Comment 5 Assaf Berg CLA 2004-11-08 04:58:35 EST
Fine. But IMHO, selecting 'ignore white space' is most helpful to prevent 
formatting changes from showing up. The most common use case being comparing a 
version in CVS, sometimes across different CR/LF platforms. I'm less interested 
in the newline change than the changes to the actual meaning of the text.
Personally, I would be willing to receive some false positives (i.e. changes in 
pure whitespace within the line that were caused by formatting) rather than 
missing some real positives (adding a space to a string!). If I wanted to see 
all formatting changes I would probably turn 'ignore white space' off. 
Alternatively this could be a separate option.
Comment 6 Tomasz Zarna CLA 2008-01-29 06:01:27 EST
The bug seems to touch a similar issue as bug 203880, or at least fixing bug 203880 would also fix this one.

*** This bug has been marked as a duplicate of bug 203880 ***