-
Notifications
You must be signed in to change notification settings - Fork 441
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
Using the "Extract as a local variable (replacing all occurrences)" feature changes only one to a variable #3860
Comments
I have seen the behaviour you're referring to just trying things out on a simple examples, but when I reverse engineered what you posted in the screenshots, it does seem to work as expected : Screencast.from.2024-11-15.11-28-52.mp4There might be some cases that aren't being properly handled so I'll have to look deeper. |
It’s really amazing. 2024-11-18.000435.mp4 |
This is an upstream Eclipse jdt.ui/Lombok issue. Test class
inline.mp4 |
Oh thank you!! As a result of the test, this is what happens when converting classes with @getter from Lombok. When implementing Getter methods directly, the entire variable is well transformed. Can you modify this so that it can work the same even if you have a Getter in Lombok? |
@khpark0203 Could you create a new Lombok issue? - https://github.com/projectlombok/lombok/issues/new/ |
@snjeza, I posted the issue on the GitHub you told me about. projectlombok/lombok#3783 |
Is there some piece of information that Lombok should provide that is lacking for JDT to do this correctly ? Why is Lombok to blame here ? |
Lombok doesn't intercept |
There seems to be no difference between the functionality of "Extract as a local variable" and the functionality of "Extract as a local variable (replacing all occurrences)."
If you use this feature in a common way as a variable, only one selected location will be changed.
I hope all the places written in common will be changed collectively.
I love vscode, but I hope this feature works well in intelij works well in vscode java as well.
before select extract menu
after select extract menu
The text was updated successfully, but these errors were encountered: