You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand what Sort Imports does, but it's less clear to me what Organize Imports does--if I use Sort Imports and then Organize Imports they both end up doing something different to the imports in the file. Could we have the tooltips for these indicate what they are supposed to do?
Additionally it seems like the entries in the Source Actions dropdown are not contextually disabled, like the entries in the Refactor dropdown (e.g. if in a file that contains no imports, the actions for imports still show up).
The text was updated successfully, but these errors were encountered:
This has been the name for a long time. Organize is intentionally generic as it's meant to be something you run without really thinking. It magically cleans up your imports (by sorting them and removing unused imports). Sort was added after organize as a way to just sort without removing unused
It's always enabled because it's like format. We still let users run format even if the code is already formatted. If we disabled when the imports were already sorted, using a keybinding for organize imports would show error messages
Testing #158636
I understand what Sort Imports does, but it's less clear to me what Organize Imports does--if I use Sort Imports and then Organize Imports they both end up doing something different to the imports in the file. Could we have the tooltips for these indicate what they are supposed to do?
Additionally it seems like the entries in the Source Actions dropdown are not contextually disabled, like the entries in the Refactor dropdown (e.g. if in a file that contains no imports, the actions for imports still show up).
The text was updated successfully, but these errors were encountered: