Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Key Shortcut for Eclipse Imports

Tags:

java

eclipse

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 anyone know what this shortcut is?

like image 268
HighLife Avatar asked Dec 20 '11 23:12

HighLife


People also ask

What is the shortcut key to import?

Cmd+I is the shortcut for Import, but just remember, that brings up this traditional import dialog, where you search for what you want and bring it into the project.

How do I add all imports in Eclipse?

Press: CTRL + SHIFT + O and you should see below dialog boxes. Choose your desired import package and click next. It will prompt you for your next import and thats it. You are done.


1 Answers

Ctrl + Shift + O (<-- an 'O' not a zero)

Note: This shortcut also removes unused imports.

like image 172
RPitre Avatar answered Sep 20 '22 22:09

RPitre