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
Organize Imports should resolve static imports as well #1386
Organize Imports should resolve static imports as well #1386
Comments
The issue can be reproduced in Eclipse. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=283287 |
@snjeza do you think it would be possible for jdt.ls to be able to easily compute autimports based on |
@fbricon Yes, I do. I will check. |
hey! can you help me, I want to import a static member 'of' from the package 'java.util.List' but i don't know how to insert it in "java.completion.favoriteStaticMembers": [...] . i'm using vscode |
I figured, thank you |
When doing
Organize Imports
, static imports should be resolved as well by using the settingjava.completion.favoriteStaticMembers
.The editor already "knows" what I want, because when I press
Ctrl+.
on one of the unresolved static imports, it proposes toAdd static import for ...
So I'd like forOrganize Imports
to go over any remaining syntax errors in the file, and see if it could be resolved by doing a static import of one of my configured favorites.Environment
Steps To Reproduce
java.completion.favoriteStaticMembers
as follows:App.java
as belowOrganize Imports
Current Result
No changes are made.
Expected Result
The following import is added automatically:
The text was updated successfully, but these errors were encountered: