How do you get Eclipse's built-in diff tool to ignore differences in whitespace?

8

2

I'm working on a large codebase that's been touched by many hands. As I work through bugs, I've been converting the source to be more readable which involves a lot of minor changes in indentation depth. Unfortunately this makes all the changes that pertain to a bugfix completely hidden in the mess when Eclipse declares every single line to be different in a file.

Is there some way to make Eclipse ignore the whitespace when you review a diff?

Conrad.Dean

Posted 2011-11-07T18:57:49.223

Reputation: 738

Answers

13

In Eclipse, go to Window > Preferences.

Then search for "patch" and click on General > Compare/Patch.

Check Ignore white space.

Now only the details that matter in the diff will show up.

Conrad.Dean

Posted 2011-11-07T18:57:49.223

Reputation: 738