It\'s been a while since I last used Eclipse. I used to love this handy key shortcut that added all the imports to the top of the source file, but I\'ve forgotten it. Does any
Some useful shortcuts. You're looking for the 1st one...
Source Here
You also can enable this import as automatic operation. In the properties dialog of your Java projects, enable organize imports
via Java Editor
- Save Action
. After saving your Java files, IDE will do organizing imports, formatting code and so on for you.
CTRL + 1 can also be used which will suggest to import.