-
Notifications
You must be signed in to change notification settings - Fork 211
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
Evaluate AnnotatedTextEdit
and ChangeAnnotation#needsConfirmation
#1155
Comments
@martinlippert i have put in first trial for this: 1539beb |
I tried the initial implementation (latest available pre-release), some initial thoughts:
I think we can try to implement the first part and probably raise an issue against VSCode for the second part to see what the team from VSCode says. Maybe there is a way to turn on this pre-selection. I also find it a bit weird that there is no "select all" option in the refactoring preview. |
One more thought: Moving the |
@martinlippert Hmm... VSCode offers to apply refactoring right away or show the preview first via the UI before the refactoring Shift-Enter would show preview. This is what i was trying to follow given the UI restrictions we have. Or you'd still like to try the popup? |
I would like to give it a try. At least for those "larger" changes (like version upgrades, running recipes on the project). So this would split the quick fixes into two categories:
|
I have pushed the support for the above with e34b39f |
I tried this in the latest snapshot builds and like it. I am still not happy that the refactoring preview doesn't pre-select all the changes, so that the user has to check everything manually. Maybe we can ask the VSCode team about this? I also saw this popup showing up when executing the upgrade via the quick fix action, but without having any effect. The changes got applied independent of the popup showing up. |
Re: No preview. Works fine from quick fixes for me... the preview is shown if the "Preview" button clicked... Was that in Eclipse? There are multiple issues created against VSCode for "Refactor Preview". Usability issues for select all and similar features as well as just against the current behaviour. I'll look them up and link here. The problem is that "Refactor Preview" related VSCode issues: |
@martinlippert I think we've done what we could with it within 4.21.1. Moving to the next release to hopefully enhance the experience. |
Let's split this issue and put additional activities into a new issue, so that we can close this one here with the changes that will already make it into 4.21.1 |
Closing. The rest is in #1176 |
VScode supports annotated edits which can a common
ChangeAnnotation
that hasneedsConfirmation
flag. Once the flag is set VSCode shows nice compare and merge UI where user can preview changes and accept/reject them.This feature needs to be evaluated whether we can take advantage of it as its purpose seem to partially accept changes. Spring Boot version upgrade usually assumes all changes are accepted otherwise code may not compile but there are exceptions from this of course.
The text was updated successfully, but these errors were encountered: