Community
Participate
Working Groups
Build Identifier: I20100608-0911 It would be great if Xtext provided Structural Compare which would ignore whitespace, comments etc. and gave a more semantic view when comparing two files. Reproducible: Always
I like the idea to explicitly exclude - whitespaces - comments - order of lists when order has no semantic??? from a textual comparison. If you've been thinking of tree views for comparison, EMF Compare is the way to go. Since Xtext implements an EMF Resource they should work together flawlessly.
Doesn't the standard text diff support ignoring whitespace? Do you really think ignoring comments is a good idea?
(In reply to comment #2) > Doesn't the standard text diff support ignoring whitespace? Optionally, it does. A quick test reveals that with this option enabled changes in line wraps are not consequently ignored. Not sure if this is intentional or a bug. > Do you really think ignoring comments is a good idea? Not per default. But it's an interesting idea. I think when people look at the comparison window they still have to do a lot of brain work to filter relevant changes from irrelevant changes. For example, a comparison mode would be great that would ignore all changes the formatter can/has applied to a file. In the comparison window, think of a menu like this: Show changes for: [ ] Whitepaces and Line Breaks [ ] Comments [ ] Order of Elements (where order has no semantic) [ ] Cross References which still refer to the same target The last option might hide changes created by "organize imports"
see comment 2