I'm trying to use JUnit and Mockito with content assist for static imports.
My Content Assist favorites lists:
org.mockito.Mockito.*
When I use content assist for the mock() method, the method is availble, but the import is just get a regular non-static import. Why is this not working?
Eclipse won't look for static imports unless you tell it to. From the Eclipse Java Content Assist Favorites Preferences help page:
To see the static import proposals, make sure Use static imports is enabled on the Content Assist preference page
Admittedly, on my machine it was enabled by default.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With