-
Notifications
You must be signed in to change notification settings - Fork 82
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
Can't rename a class #3014
Comments
I guess the Ast approach won't work, as renaming the class would also involve rename the Java file (which I guess not done by the Ast API). For the latter one, would it work if you try it a few more times on JDK 17? (we've seen some intermittent problem on finding a class during customization, not sure why though) Loop in @alzimmermsft |
Retry loop around |
Yeah, I am not sure why it behaves this way (that the function only works after some time, or some retry). @alzimmermsft Could it be some lag on language-server part? Maybe it need take some time to initiate its internal upon the source code? |
That's been my thought, that this is some form of race condition going on where the server reports completion before it's ready to support further usage. |
This code:
Fails like this:
When
refreshSymbol
runs afterCustomizeAst
is done, because the underlying type name has changed without the mechanics of the normalClassCustomization.rename
.Unfortunately,
ClassCustomization.rename
as called below fails on Java 17+:fails like this on Java 17+, but works on Java 11:
The text was updated successfully, but these errors were encountered: