You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Antonio Marques (Jira)" <ji...@apache.org> on 2021/02/24 00:41:00 UTC
[jira] [Created] (NETBEANS-5383) On save 'Organize imports' should
only delete imports if on save 'Delete unused imports' is selected
Antonio Marques created NETBEANS-5383:
-----------------------------------------
Summary: On save 'Organize imports' should only delete imports if on save 'Delete unused imports' is selected
Key: NETBEANS-5383
URL: https://issues.apache.org/jira/browse/NETBEANS-5383
Project: NetBeans
Issue Type: Bug
Environment: In the *On save* actions there are two checkboxes, *remove unused imports* and *organize imports*.
When by itself, *remove unused imports* does what it's supposed to do. Unused imports are deleted.
But when *organize imports* is on, it ignores *remove unused imports*, and always deletes any unused imports. I believe that happens because the actions were independently implemented, but they're together in the UI and if one of them in practice extends the other, then it's confusing - in other apps what happens is that selecting *organize* would select and disable the *delete* checkbox. But I'd much rather have them working together, and only have *organize* delete imports if *delete* were selected.
My problem may lie somewhere else: it's common to have a *used* import momentarily broken because of an upstream project, and either *delete* or *organize* will delete the import, which is imo wrong since it isn't unused (maybe the analyzer cannot tell the difference, but it should). I end up having to disable the on save actions and restore the deleted imports by hand, which is the opposite of what a convenience feature should achieve.
Reporter: Antonio Marques
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists