I found it. Options -> Editor -> On Save -> Remove Unused imports.
On 1/24/25 14:57, Fred Welland wrote:
my nb 24 -- puts a icon (warning ! ) on the left margin of the edit buffer of a java file containing un-needed imports. Right click and the pop-up menu has 'remove' or 'remove all un-used'. This is, file by file. One may have to enable this, if not default. Maybe checkout Tools->Options->Editor->Hints . There are some other tooling and plugins that get inventories of code-quality things like un-used imports, project wide. Maybe some of those have project wide operations to correct this stuff -- can't say for certain. HTH On Fri, Jan 24, 2025 at 5:50 AM Code Ranger <coderanger2...@outlook.com> wrote: Hello everyone, I use NB 24. Could anyone say if it possible to remove unused imports on file save? If not how to do it manually? Best regards, CR --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists