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'm trying to migrate from IntelliJ and one of the best features it has is the code improvement suggestions. For example, if I'm using JDK7+ and my code is not using the "diamond operator", it offers me to convert the code to this cleaner version. And it does this for:
Convert to try-with-resources on JDK7+
Convert to lambda on JDK8+
And a lot more.
I know this issue is very broad and probably each of theses code refactoring should have its own issue linked to this one. But first I want to check what the core developers think of this.
We should have "quickfixes" available, which work similar to how you are suggesting. They can be activated by placing the cursor on a problem, then pressing Ctrl+., or clicking on the lightbulb that appears. Are there any quickfixes in particular you think are missing? If so, feel free to file a specific issue for it.
There might be some quickfixes available for which the corresponding warning isn't enabled by default. Because there's no problem to attach the "fix" to, the "fix" isn't suggested. VS Code provides a mechanism to allow the quickfixes even when there isn't a problem, but then it's harder for the end user to know it's available. Maybe we can enable some more of the compiler warnings in order to make the fixes more visible.
Upstream in Eclipse, there's also the concept of "cleanups", which are similar to quickfixes in that they try and improve the code, but they are designed to be performed on the whole file at once instead of just one problem. They are activated in Eclipse when a dropdown menu item is clicked or, if enabled, on file save. We might be able to refactor some of the cleanup logic and repurpose it for quickfixes that are missing in vscode-java.
Activity
datho7561 commentedon Jun 17, 2026
We should have "quickfixes" available, which work similar to how you are suggesting. They can be activated by placing the cursor on a problem, then pressing
Ctrl+., or clicking on the lightbulb that appears. Are there any quickfixes in particular you think are missing? If so, feel free to file a specific issue for it.There might be some quickfixes available for which the corresponding warning isn't enabled by default. Because there's no problem to attach the "fix" to, the "fix" isn't suggested. VS Code provides a mechanism to allow the quickfixes even when there isn't a problem, but then it's harder for the end user to know it's available. Maybe we can enable some more of the compiler warnings in order to make the fixes more visible.
Upstream in Eclipse, there's also the concept of "cleanups", which are similar to quickfixes in that they try and improve the code, but they are designed to be performed on the whole file at once instead of just one problem. They are activated in Eclipse when a dropdown menu item is clicked or, if enabled, on file save. We might be able to refactor some of the cleanup logic and repurpose it for quickfixes that are missing in vscode-java.