Make "Compare with Clipboard" work in active editor of FormEditor#2100
Make "Compare with Clipboard" work in active editor of FormEditor#2100iloveeclipse merged 2 commits intoeclipse-platform:masterfrom
Conversation
e.g. m2e's MavenPomEditor or PDE's ManifestEditor Signed-off-by: Till Brychcy <register.eclipse@brychcy.de>
|
@SougandhS can you review? |
SougandhS
left a comment
There was a problem hiding this comment.
Tested the changes & LGTM 👍
Thank you for the improvement
|
Why only |
I noticed that |
SougandhS
left a comment
There was a problem hiding this comment.
@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 <register.eclipse@brychcy.de>
|
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