-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Organize Imports on save does only work with manual settings.json-edit #1071
Comments
There is a limit on the usage of "Java > Save Actions: Organize Imports", it can only add import for the classes with unique package import option, but ignore those with multiple import candidates. Could you check if there are multiple File import options in your project? And if you try to add a snippet Anyway, i would recommend using |
|
Screen.Recording.2021-11-09.at.20.21.36.mov
Adding one more setting just to help configure another setting seems to go a bit too far. But I'm open to this, just need to know if this is what most users want. |
with
vscode-import.mp4 |
I just tried to reproduce in Ubuntu:
|
Since this feature is provided by https://github.com/redhat-developer/vscode-java/issues, I will move the issue there for further investigation. |
Use redhat-developer/vscode-java#2207 to track the issue. |
Environment
Steps To Reproduce
Current Result
Even with checkbox checked in settings menu "Java > Save Actions: Organize Imports" (which results in
"java.saveActions.organizeImports": true
in settings.json): imports are not automatically organized
Expected Result
Imports are automatically organized on file save with setting checked
Additional Informations
if you modify the settings.json manually to:
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
regardless if Java > Save Actions-option is checked, imports work, but you have to search for this solution on Stackoverflow
The text was updated successfully, but these errors were encountered: