Eclipse: add import to a bunch of classes

I have 60 Java classes in an Eclipse project that I am reorganizing (everything was in the default package, ick!), Which should import another project into the project (recently created by another refactoring).

I would prefer not to do Ctrl+Shift+Ofor each file. Is there any way to speed this up?

+5
source share
4 answers

Select the project in the package tree and press Ctrl-Shift-O. He will organize the import for all project files.

+9
source

Righclick in the source folder → Source → Organize Import.

+1
source

Ctrl-Shift-O.

→ "" →

+1
source

Ctrl-Shift-O The shortcut is useful for organizing import statements.

You have many shortcuts in the Eclipse IDE -

Ctrl-Shift-l will show shortcuts in eclipse

0
source

All Articles