awt contains the List
class (java.awt.List
).
It's an unmitigated disaster, that. 99.9995872858% of the time that you type List
and hit autocomplete, you just want eclipse to auto-import java.util.List
, instead, until the most recent version, it popped up a non-modal dialog: Did you mean java.awt.List
or java.util.List
?
Programmers, being their usual lazy/incapable self, whined about this. That was a bit daft of them; there is a trivial setting in eclipse to banlist an entire package, so that it doesn't show up pretty much anywhere: Not in the Open Type dialog, and not in autocompletes. That's the 'Type Filter' feature and it's been around for years.
But programmers decided to continue to whine instead of add the setting.
With that context in mind, this should now make sense:
java.awt.*
is now on this banlist by default.
But, you unique snowflake you, you found a time machine or cryosleep capsule, and slept through 20 years of history. Apparently, what other possible explanation could there be that you're still using AWT?
At any rate, simply take java.awt
off that banlist and all will be well.
Open your eclipse workspace preferences, type 'Type Filters' in the filterbox. You're looking for setting java > Appearance > Type Filters
. Click that, then uncheck java.awt
.