Sick of java.awt type ahead suggestions in Eclipse?

Then you need this little handy tip. There are many classes with identical or similar names in the java.awt and the SWT widget libraries. Having to distinguish between the package names in the type ahead dropdown is a pain and lead to wrongful imports so do yourself this favor:

  • Open Eclipse
  • Select Window/Preferences from the menu
  • Expand Java/Appearance/Type Filters from the menu on the left
  • Click the “Add package” button, enter “java.awt” (without the quotes) and click OK
  • OK your way out

This will make Eclipse remove any matching classes from the java.awt package from your type ahead list. Very nice…

And while you’re there you might want to add lotus.domino.cso, lotus.domino.local and lotus.notes to the list as well as all Domino programming is done through the lotus.domino package.