Introduce Unified Diff display mode to Compare editor#2560
Draft
tobiasmelcher wants to merge 1 commit intoeclipse-platform:masterfrom
Draft
Introduce Unified Diff display mode to Compare editor#2560tobiasmelcher wants to merge 1 commit intoeclipse-platform:masterfrom
tobiasmelcher wants to merge 1 commit intoeclipse-platform:masterfrom
Conversation
Contributor
Contributor
Author
Contributor
|
Looks amazing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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