Hi. I wonder that there is no way to quickly add static import (+ refactor all occurances).
It is really actual while writing tests or using spring 5 functional routing for example.
static import itself throwing error, in my case
@jnesspro By default, the Java extension will only recommend static import for the members below.
"java.completion.favoriteStaticMembers": [
"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.*"
]
If you want to enable static import for spring 5 members, you need modify the user settings and append your favorite package into java.completion.favoriteStaticMembers.
For example:
"java.completion.favoriteStaticMembers": [
...
"org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*",
"org.springframework.test.web.servlet.result.MockMvcResultMatchers.*"
]
@cedric05 Can you execute VS Code command Java: Open Java Language Server log file, and share us the log?
@testforstephen sorry for filing wrong. its working.
You asked for it, @testforstephen delivered:

@fbricon How are you bringing up the menu?
Click on static method, Ctrl+. (Cmd+. on mac) or click on lightbulb or right-click -> Code Action
Most helpful comment
Click on static method,
Ctrl+.(Cmd+.on mac) or click on lightbulb or right-click -> Code Action