Skip to content

Support unified diff for version history entries - #2935

Merged
tobiasmelcher merged 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:unified-diff-version-history
Sep 23, 2026
Merged

tobiasmelcher merged 1 commit into
eclipse-platform:masterfrom
tobiasmelcher:unified-diff-version-history

Conversation

@tobiasmelcher

Copy link
Copy Markdown
Contributor

Comparing two entries in the Eclipse History view currently falls back to the classic side-by-side compare editor, even when unified diff is enabled. Both historical revisions are represented by storage-backed editor inputs, which were not eligible for unified diff.

This change recognizes a pair of revision storage inputs and opens the right-hand revision in a read-only editor with the left-hand revision overlaid as the diff. This brings revision-to-revision comparisons into the unified diff workflow while preserving historical content as non-editable.

@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  +  3      54 suites  +3   54m 35s ⏱️ -23s
 4 811 tests ±  0   4 789 ✅ +  1   22 💤 ±0  0 ❌  - 1 
12 324 runs  +261  12 171 ✅ +262  153 💤 ±0  0 ❌  - 1 

Results for commit 1c0512c. ± Comparison against base commit 6e4cd9b.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
org.eclipse.compare.tests.UnifiedDiffOpenTest ‑ testClassicEditorOpensForTwoRevisions
org.eclipse.compare.tests.UnifiedDiffOpenTest ‑ testUnifiedEditorOpensForTwoRevisions

♻️ This comment has been updated with latest results.

@vogella

vogella commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

There is a comment in CompareUIPlugin.java:928: "an editor opened on anything else, a revision for example, comes up empty." With this change that is not true anymore and the comment should be updated.

Also the scope seem wider than "version history entries", as the commit message indicates. I think it will also work for index-vs-HEAD comparisons (I did not test this).

@vogella

vogella commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Otherwise a great change! Thanks @tobiasmelcher

@tobiasmelcher
tobiasmelcher force-pushed the unified-diff-version-history branch from 5fd575c to 59cecf0 Compare September 21, 2026 07:24
@tobiasmelcher

Copy link
Copy Markdown
Contributor Author

Thanks Lars, good catch - I have updated the comment.

@tobiasmelcher
tobiasmelcher force-pushed the unified-diff-version-history branch from 59cecf0 to 1c0512c Compare September 22, 2026 08:45
@tobiasmelcher
tobiasmelcher merged commit e5de473 into eclipse-platform:master Sep 23, 2026
18 checks passed
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