- Notifications
You must be signed in to change notification settings - Fork914
Show original and changed linefeed in diff view#8645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Show original and changed linefeed in diff view#8645
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ide/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffView.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
097cde8 to273527eCompare
matthiasblaesing left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Nice feature and works.
Independent of this change NetBeans will not detect changes to the line endings if the document is already opened (BaseDocument initializes the property exactly once). This is a different problem though.
For the implementation I left a few inline comments.
ide/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffView.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ide/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffView.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ide/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffView.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ide/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffView.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
ide/diff/src/org/netbeans/modules/diff/builtin/visualizer/editable/EditableDiffView.java OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Chris2011 commentedAug 8, 2025
Everything changed and tested as requested. Thx. |
Chris2011 commentedAug 8, 2025
I already added a background to make it more prominent. I already wanted to use the colors from the git integration for added, deleted and modified as forground colors for just the text, but they didn't fit on the light theme. |
matthiasblaesing left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks sane to me. Thank you. Please squash before merging.
7487fb5 toc72e616Comparec72e616 to0615a38Compare554e8f0 intoapache:masterUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
The current behavior, when the linefeed changes, you just see, that the file was modified but you dunno why. This PR adds the original and the changed linefeed.
I used GridLayout for the header because I couldn't handle adding the exact position what it is now. But this changes the layout a bit, You can see it in the before and after image.
Before

After

So I'm not that good at design JSwing UIs with correct position etc. So please have a look and if you find a better solution, please lemme know.
^Add meaningful description above
Click to collapse/expand PR instructions
If you're a committer, please label the PR before pressing "Create pull request" so that the right test jobs can run.
PR approval and merge checklist:
If this PR targets the delivery branch:don't merge. (full wiki article)