Introduce Unified Diff display mode to Compare editor#2560
Introduce Unified Diff display mode to Compare editor#2560tobiasmelcher wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
|
Looks amazing |
|
I very much like that feature. I would be in favor of integrating a usable state as early as possible and incrementally improve it, so that it becomes easy to test and so that you get feedback soon. You currently seem to introduce new API with the |
|
@tobias-melcher can you finish this one? Would be awesome to have this as option (hopefully the default 1-2 releases later). |
For me github shows by default a split view (what often is a bit better than the eclipse one but that's a different story) and one has to explicitly select "unified" - so I don't think one is the "default" over the other but its just two options one can switch between and depends on preference of the user. |
Sure, I will do my best. I think the most important topic is that we get rid of the reflection calls. I will concentrate on this topic in the next weeks. I understand the request to make this feature available as early as possible and mark it as experimental. I will do this. |

Add Unified Diff Display in Text Editor as Alternative to Classic 2-Way Compare
Implements eclipse-platform/eclipse.platform.ui#3771
Summary
This contribution introduces a new Unified Diff viewing mode for
org.eclipse.comparethat displays differences in a single editor pane, similar togit diffor GitHub's pull request view. When enabled, it replaces the traditional side-by-side 2-way compare editor for read-only comparisons, providing a more compact and familiar diff experience.This is a draft implementation to gather early feedback from the Eclipse community on:
What's Included
1. New Public API (
org.eclipse.compare.unifieddiff)Added a new public package with the
UnifiedDiffclass as the main entry point for programmatically opening unified diffs in text editors.Supported Modes:
API Example:
2. Preference Page Integration
Added a new checkbox in Preferences > General > Compare/Patch:
When enabled, eligible compare operations automatically use the unified diff viewer instead of the traditional side-by-side editor.
3. Automatic Compare Editor Integration
Modified
CompareUIPlugin#openCompareEditor()to detect when unified diff should be used:How to Test
Prerequisites
Steps
Expected Result:
Next Steps