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.

Bug 218153 - There is no Action that combines Organize Imports with Fix Imports
Summary: There is no Action that combines Organize Imports with Fix Imports
Status: RESOLVED DUPLICATE of bug 212585
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-11 16:13 UTC by matthies
Modified: 2014-02-03 11:17 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description matthies 2012-09-11 16:13:34 UTC
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.
Comment 1 javydreamercsw 2012-09-11 16:19:45 UTC
Can you configure Inspect and Transform to do this? I'll take a look...
Comment 2 matthies 2012-09-11 16:26:26 UTC
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.
Comment 3 crazyjavahacking 2012-09-12 14:54:33 UTC
Definitely should be a new action.
Comment 4 markiewb 2014-02-03 11:17:57 UTC
Dup of #212585?

*** This bug has been marked as a duplicate of bug 212585 ***