You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the code action for adding missing imports only suggests classes. Often we might want to statically import a Java static method or similar. Those are currently not suggested by the code action. Worked a lot with some static helper methods in a library at work today, so it bothered me enough to create an issue 😛 If nothing else, then as a wishlist item.
Example: We have written the code currentThread() in our editor, and naturally we get an error. Neither the completion (when we wrote it) or the code action (after writing) suggests anything. One possible suggestion would be to import java.lang.Thread.currentThread (aka the static method currentThread).
Unsure on how to solve this. The easiest solution would probably be to put the static methods in the symbol index as well, as we would easily query it that way. The initialization of the server is already slow and consume a lot of memory, so I'm a little bit hesitant to implement it that way. Please let me know if anyone have any suggested solutions 🙂
This is probably true for the completion functionality as well.
The text was updated successfully, but these errors were encountered:
Currently, the code action for adding missing imports only suggests classes. Often we might want to statically import a Java static method or similar. Those are currently not suggested by the code action. Worked a lot with some static helper methods in a library at work today, so it bothered me enough to create an issue 😛 If nothing else, then as a wishlist item.
Example: We have written the code
currentThread()
in our editor, and naturally we get an error. Neither the completion (when we wrote it) or the code action (after writing) suggests anything. One possible suggestion would be to importjava.lang.Thread.currentThread
(aka the static methodcurrentThread
).Unsure on how to solve this. The easiest solution would probably be to put the static methods in the symbol index as well, as we would easily query it that way. The initialization of the server is already slow and consume a lot of memory, so I'm a little bit hesitant to implement it that way. Please let me know if anyone have any suggested solutions 🙂
This is probably true for the completion functionality as well.
The text was updated successfully, but these errors were encountered: