redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.05k stars 420 forks source link

Support linked correction proposals #3686

Open hopehadfield opened 6 days ago

hopehadfield commented 6 days ago

Add support for linked correction proposals, as is done in Eclipse

linked-proposal

Currently, the same quickfix in vscode-java only gives the first option from the list.

no-linked-proposal

rgrunber commented 5 days ago

The LSP Spec now supports SnippetTextEdit, so this is possible for code actions. You may have some difficulty sending it on the language server side with the existing lsp4j library as it lacks the necessary classes, but should be possible to work around that. The language client we use (vscode-languageserver-node) also seems to now support it.

fbricon commented 5 days ago

As usual, make sure the client supports it before sending SnippetTextEdits