When auto-completing a class name in Eclipse, e.g. if you type:
ListITab
A pop-up menu appears offering you matching class names for completion (which you can select with the mouse or by using the arrow keys:
In this example, I almost certainly want java.util.ListIterator and I almost never want com.sun.xml.internal.bind.v2.runtime.reflect.ListIterator (or anything else from that package).
This particular class will appear in the list frequently (every time I declare a ListIterator). I would like to be able to exclude packages from autocomplete searches, so that java.util.ListIterator is auto-completed without the need for a pop-up menu.
Is this possible?
Window>Preferences>Java>Appearance>Type FiltersYou should be able to specify there the packages you do not want to see.
See Java Tips and Tricks
finnw (the OP) adds in the comments:
"Type filter" is actually based on class pattern matching, meaning if you add:
that class will disappear from the content assist propositions.
If you know all
java.awt.Lxxxclasses are of no interest, you could addAll other classes from
java.awtwould still be there for the content assist.With a recent eclipse (I have right now a eclipse 3.6Mx, but this should work for 3.5.x as well), you are not limited to package pattern only in the Type Filter.