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.
build 126 (20081031) When the Imports options for 'Remove Duplicate Imports' and 'Unused imports: Leave Alone' are set (Tools->Options->Editor->Formatting->'Language:Python & Category:Imports'), doing the 'Fix Imports' action on in the editor still remove all the duplicate and unused imports.
Selecting 'Unused imports: Comment Out' also remove unused imports instead of commenting out unused imports.
Hi Peter, Those settings pertain to formatting. When people format their code, they may not want it to add/remove imports. But that's precisely what "Fix Imports" is for - it tries to add imports (if any are missing) and remove imports (if some aren't needed). "Fix Imports" is more invasive, and takes more time to compute. That's why you have the option of turning it off during formatting - you can turn off touching the imports at all, or you can have it organizing the imports but not adding/removing. Fix Imports is independent of that. When you run "Fix Imports", it also organizes the imports, so it will use the formatting settings for that. It probably -should- use the comment-out versus delete preference from the formatting settings in this case. Leave the bug open to track that issue.
You're right, Tor. I confused with Fix Imports, but it seems to make sense for Fix Imports to share a few of the settings too.
Not sure it is still relevant with the current version. Closing this as old bug. If this is still a thing, please reopen and accept my apologies.
Thanks for your evaluation Julien. Reporter, if you think your issue is still valid and needs to be addressed, don't hesitate to reopen it with additional information. Closing for now.