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 231686 - Organize imports not consistent with format settings
Summary: Organize imports not consistent with format settings
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3.1
Hardware: PC Windows Vista
: P4 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-23 23:11 UTC by Nibsi
Modified: 2016-07-07 07:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nibsi 2013-06-23 23:11:20 UTC
Organize imports and the Organize imports hint ignore the "Use Package Imports" setting under "Tools > Options > Editor > Formatting > Java > Imports".

When I select "Use Single Class Imports" and check/uncheck "Class Count To Use Star Import" and then select "Use Package Imports" again, Organize imports reflects the changes I made to the "Use Single Class Imports" without recognizing that I want to use package imports instead.

When I use single class imports, and check the class count checkbox, Organize imports alternates between wanting to use star import for any number of imports, and the number of imports specified.

This is reflected in both the hint, and when I have Organize Imports On Save enabled. Saving the file organizes the imports, then making a trivial edit and saving again reorganizes the imports to the original state.
Comment 1 Martin Balin 2016-07-07 07:19:06 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss