coc-java
coc-java copied to clipboard
Not getting static import of a method as refactoring suggestion.
Hi,
in this commit the following functionality was added: get a proposal for static import of a method in quick assist. Note that this was later moved to something refactoring related, but it should be there nevertheless.
When i hover over a method which i would like to import statically, i do not get the suggestion for static import. Not in quick fix and also not in the refactoring menu.
Is this intended or should coc-java behave the same as vscode here?
Depending on the static methods you're trying to use you may need to set the java.completion.favoriteStaticMembers configuration. By default it completes static members in these paths:
[
"org.junit.Assert.*",
"org.junit.Assume.*",
"org.junit.jupiter.api.Assertions.*",
"org.junit.jupiter.api.Assumptions.*",
"org.junit.jupiter.api.DynamicContainer.*",
"org.junit.jupiter.api.DynamicTest.*",
"org.mockito.Mockito.*",
"org.mockito.ArgumentMatchers.*",
"org.mockito.Answers.*"
]