Summary: | [quick diff] Quick Diff should allow to ignore white-space | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Chris West (Faux) <eclipse> |
Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | daniel_megert, deepakazad, eclipse, joshgold, remy.suen, tomasz.zarna |
Version: | 3.6 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Chris West (Faux)
2010-05-14 21:41:15 EDT
It's not only changes in whitespace at ends of lines that make Quick Diff nearly useless. Adding or removing a control-flow structure around any block of code causes Quick Diff to show all lines in that block as having changed. This can confuse the diff's ability to find minimal changes in surrounding code and generally creates quite a mess of a diff. Suggest the following Quick Diff options, which follow from the options available in the GNU diffutils: [ ] Ignore changes in white space ( ) Ignore changes due to tab expansion only (-E) ( ) Ignore changes in the amount of white space (-b) ( ) Ignore all white space (-w) [ ] Ignore changes whose lines are all blank (-B) (In reply to comment #1) > [ ] Ignore changes whose lines are all blank (-B) "Ignore changes whose lines are all blank" maybe only makes sense in the context of diff hunks. A better way to word the option for Quick Diff might be "Ignore changes in the number of blank lines". This is important to me both for diff noise from whitespace cleanup and especially for control structure (wrapping in or removing an if block or loop around some code.) Please do not share the setting with the general editor diff. I for one use them differently — I use full-on diff for more "heavy" processes where I'm much more likely to want to see the whitespace changes. I use the sidebar all the time to see where I'm working in a long file, and the noise gets in the way of that. I think it would often be the case that I would not realize the setting had changed when I go to look at a "slow" diff, and would miss some of that information. In any case, I would find it a bother to have to change the setting back and forth when I (more rarely) use the full diff. I think this would be most discoverable as a checkbox in the quickdiff context menu: "Ignore whitespace". Also fine to make it a dialog for "Ignore whitespace..." with options like Matt Whitlock suggested. (We could still use a checkmark in the menu to show if any of those whitespace variants are being ignored.) |