Skip to content

Honor compare filters in unified diffs - #2984

Open
tobiasmelcher wants to merge 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:unified-diff-compare-filters
Open

tobiasmelcher wants to merge 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:unified-diff-compare-filters

Conversation

@tobiasmelcher

Copy link
Copy Markdown
Contributor

This change ensures unified diffs honor registered compare filters so they render consistently with the traditional two-way compare.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   58m 16s ⏱️ + 1m 37s
 4 852 tests +3   4 830 ✅ +3   22 💤 ±0  0 ❌ ±0 
12 447 runs  +9  12 293 ✅ +9  154 💤 ±0  0 ❌ ±0 

Results for commit 370e2cf. ± Comparison against base commit 8fa7d88.

@tobiasmelcher

Copy link
Copy Markdown
Contributor Author

Why is this change needed?

ABAP Development Tools contributes an ICompareFilter implementation that ignores differences in the casing of ABAP keywords and identifiers. ABAP is case-insensitive, so casing differences must not be reported as source-code changes.

Previously, the unified diff did not apply this compare filter. Consequently, it rendered a much larger diff than the traditional two-way compare and obscured the only relevant change: itab versus itab2.

The following screenshots show the inconsistent presentations before this change.

Traditional two-way compare, correctly showing one relevant difference:

two_way_with_compare_filter

Unified diff without applying the compare filter, incorrectly treating casing differences as changes:

unified_diff_without_compare_filter

With this change, the unified diff applies the contributed compare filter and highlights only the actual difference between itab and itab2:

unified_diff_with_compare_filter

@vogella

vogella commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Hey Tobias, for private and business reasons I will the next weeks not have the time to look at unified diff.

Don't be delayed by that, I'm looking forward to enjoy the fruit of your changes.

Btw. I think unified diff should already be set as default, it make make compare usable in Eclipse which it never was for me with the old compare and switching back is super easy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants