Reputation: 8043
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
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:
There is also an inspection named "Unused Imports"
Upvotes: 28