hamed
hamed

Reputation: 8043

Netbeans - fix imports on entire project

I'm using netbeans IDE 8.0. When I hit right click inside the editor, one option is Fix imports(CTRL + SHIFT + I). This option adds useful imports and removes unused imports. But How can I use Fix Imports on entire project(not single file)? Is there any way for doing that?

Upvotes: 21

Views: 13494

Answers (1)

user330315
user330315

Reputation:

Right click on the project (or a package if you want), then choose "Inspect and Transform".

In the dialog box, choose "Organize Imports" , from browse choose imports --> then --> organize imports:

enter image description here

There is also an inspection named "Unused Imports"

Upvotes: 28

Related Questions