-
Notifications
You must be signed in to change notification settings - Fork 147
Make "Compare with Clipboard" work in active editor of FormEditor #2100
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e.g. m2e's MavenPomEditor or PDE's ManifestEditor Signed-off-by: Till Brychcy <[email protected]>
@SougandhS can you review? |
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.
Tested the changes & LGTM 👍
Thank you for the improvement
Why only |
I noticed that |
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.
@brychcy while you already fixed this issue for Compare
, would it be possible to add the same change in org.eclipse.compare.internal.ClipboardReplace
too ?
same code can be pasted before if (editor instanceof ITextEditor txtEditor) {
I can, but actually may I ask why "Replace With > Clipboard" exists at alll? At least on macOS I can just do "paste" (CMD-V) and the current selection will be replaced with the clipboard contents. If I want to replace the whole file I can easily do "select all" (CMD-A) first. Also the "Clipboard" entry is now in the "Replace With"-submenu in between "Local History..." and "Previous from Local History" and the feels really misplaced there (actually everything else in that submenu is also history related, so if you really wanted to keep it, maybe move it to the end?) So in the current state I think this makes normal usage of "Replace With"-options harder to use. |
Yeah it can be moved to the end 👍 |
Also there are still some issues with "Replace With... > Clipboard". E.g. it directly changes content of "derived" files. |
I agree with that comment in that being able to compare files with the Clipboard is useful, but I disagree that adding "Replace" is a good idea |
Will check that. thanks for noticing 👍 |
Similar, "Replace with" doesn't check for "Locked" |
Also "Replace With" applied on files should have "Undo" support |
Anyways, thanks a lot for providing "Compare With..." Clipboard! |
e.g. m2e's MavenPomEditor or PDE's ManifestEditor Signed-off-by: Till Brychcy <[email protected]>
Anyways I added the code as requested to ClipboardReplace, too, so we can close this. |
Sorry for the late reply, I was at lunch. |
Thank you @brychcy |
Taking this back, you keep this commit. Thank you for this again |
Hi @vogella |
Thanks everyone. Change looks good.
The feature is part of AnyEdit since ~15 years or so :-) |
Thanks @brychcy , nice to see you contributing again. Thanks @SougandhS for the review |
|
Interesting. |
There is. Andrey's AnyEditTools can do that, too. |
Thanks for this, I have incorporated this change in #2007 |
e.g. m2e's MavenPomEditor or PDE's ManifestEditor