Is there a way to blacklist certain types from consideration in Eclipse's code completion?
For example, I use Google Collection's com.google.common.collect.Lists
class quite often. What I will do is type "Lists" then Ctrl-space and select a method (like newArrayList()
) and Eclipse will add the import statements automatically. But one annoying thing is that TestNG has the same identical class with a different package name org.testng.v6.Lists
and often I will select the TestNG version by mistake.
Is there a way to "blacklist" org.testng.v6.Lists
from consideration in code completion so I don't import it by mistake?
You can set up Type Filters to do this. See the section "Suppress types in content assist" here for more information.
Here are some screen shots for posterity:
Open the preferences dialog and go to Java -> Appearance -> Type Filters:
Click the "Add..." button:
Now it should appear in the Filter list:
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