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?
For Netbeans use Ctrl+Shift+I to remove unused import from the file.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With