Bug 45857 - java source compare doesn't ignore whitespace [comapre]
Summary: java source compare doesn't ignore whitespace [comapre]
Status: RESOLVED DUPLICATE of bug 74636
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-31 09:43 EST by Nikolay Metchev CLA
Modified: 2007-10-23 09:12 EDT (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 Nikolay Metchev CLA 2003-10-31 09:43:18 EST
the java source compare doesn't ignore whitespace differences even though I 
have enabled that option in Workbench->Compare/Patch. Something tells me that 
that option doesn't apply to java source compare and that there should be 
another section under Java for preferences for the java source compare!
Comment 1 Philip Borlin CLA 2005-01-25 13:14:36 EST
Here is an example from a code session from today.  I hit format and then ran a
diff with the original code:

Before format:
if (getCboMaxRecords().getSelectedItem().toString().equalsIgnoreCase(
				"All")) {

After format:
if (getCboMaxRecords().getSelectedItem().toString().equalsIgnoreCase("All")) {

There is no difference between these two pieces of code, the only thing that
cnaged was the format, yet the diff window still shows them as being different.

I am using Eclipse 3.1M4 on WinXP and I have
Window->Preferences->Compare/Patch->General->Ignore Whitespace checked.
Comment 2 Marko Schulz CLA 2005-03-22 11:06:26 EST
The problem seems to be that the eclipse compare is line oriented and so the
"Ignore whitespace" only ignores whitespaces _within_ a line (spaces and tabs)
but not newlines or carriage returns.

So this doesn't really seem to be a bug (I suggest to close it - mark it as
invalid) but the design.

Bug #74636 proposes a change in the behaviour of "Ignore whitespace".
Comment 3 Martin Aeschlimann CLA 2007-10-23 09:12:57 EDT

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