vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Support linked correction proposals

Open hopehadfield opened this issue 1 year ago • 4 comments

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

hopehadfield avatar Jun 26 '24 20:06 hopehadfield

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.

rgrunber avatar Jun 27 '24 11:06 rgrunber

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

fbricon avatar Jun 27 '24 12:06 fbricon

An update from @hopehadfield :

dropdown

rgrunber avatar Jul 24 '24 13:07 rgrunber

We may have to live with the side effects of https://github.com/microsoft/vscode/issues/63129 since the server-side snippets get an additional indentation.

rgrunber avatar Aug 09 '24 20:08 rgrunber