This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This is a follow-up to issue 206585. Organize Imports is very nice, but most of the time it doesn’t make sense to use it separately from Fix Imports. Having "Fix Imports" as a separate action is certainly useful if you only want to "fix" and not to "organize". The common use-case for Organize Imports is an overall clean-up of the imports though, which means organizing imports as well as removing unused imports (and possibly fixing faulty imports). There should be single "clean-up my imports" action addressing this use-case (possibly configurable in what exactly it performs) as a built-in feature with a pre-defined keyboard shortcut and a menu item in the Source menu. When doing Organize Imports, there's rarely a reason why it shouldn't include Fix Imports, so one way to achieve the above would be to have Organize Imports include the functionality of Fix Imports. See also the current thread about this matter on the NetCAT mailing list.
Can you configure Inspect and Transform to do this? I'll take a look...
The goal is to be able to perform it with a single keyboard shortcut. For the user, it's a "get rid of all the yellow (and red) stuff in the imports section" action, like Fix Imports used to be, but now there's the new warning for "disorganized" imports, so Fix Imports doesn't cause everything to become "fixed" anymore like it did before.
Definitely should be a new action.
Dup of #212585? *** This bug has been marked as a duplicate of bug 212585 ***