-
Notifications
You must be signed in to change notification settings - Fork 456
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
addFinalModifier save action cannot be disabled #3370
Comments
I can't reproduce the issue. |
I'm experiencing the same issue, on macOS 14, vscode 1.83.1, extension 1.24.0. Workspace settings contain:
Personal settings.json doesn't contain any |
@knutae @stianeikeland could you try to remove the |
Yes, removing |
Seems like this is due to eclipse-jdtls/eclipse.jdt.ls#2870 . The language server detects the preference constants that would have been supported in Eclipse-land under settings, and opts to include them. @knutae , did you also have It's a bit odd that a user could enable cleanups via. the vscode option, |
Yes |
Based on the fact that this is causing confusion, I'll disable it when we detect that JDT-LS is running headless (or when there is no jdt.ui bundle detected) |
I think I'll close this for now as the main issue is addressed. There remains a much smaller issue, which is that if This is really a case of the client wanting to take ownership over a setting for all scopes, but a particular project type (eg. Eclipse-style projects) has a way to set those settings at the project-level through another mechanism. I don't think it's too annoying to respect those setting if someone has taken the time to place them in the project. This reminds me a lot of eclipse-jdtls/eclipse.jdt.ls#2942 . |
After upgrading to the latest version (1.24.0), final modifiers are added to parameters and variables on save, even though the addFinalModifier has been explicitly omitted from the Java save actions settings.
Environment
Steps To Reproduce
"java.cleanup.actionsOnSave": ["addOverride"]
Current Result
Final modifiers are added during save, and there does not appear to be a way to disable this.
Expected Result
Final modifiers should only be added if the "addFinalModifier" save action is configured.
Additional Information
The issue exists both in 1.24.0 and the latest prerelease version. Downgrading the plugin to 1.23.0 fixes the issue.
The text was updated successfully, but these errors were encountered: