eclipse-lsp4j / lsp4j

A Java implementation of the language server protocol intended to be consumed by tools and language servers implemented in Java.
https://eclipse.org/lsp4j
Other
613 stars 145 forks source link

Don't annotate SymbolInformation as Deprecated #698

Closed jonahgraham closed 1 year ago

jonahgraham commented 1 year ago

While SymbolInformation class is deprecated in the LSP specification. It is not annotated with Deprecated annotation because the TextDocumentService.documentSymbol method requires it and causes deprecated warning in the code of all users of that API.

Instead we mark all the methods/constructors as @Deprecated so that consumers that are actually using instances of SymbolInformation get deprecated warnings, while avoiding deprecated warnings for just referring to the type.

Fixes #697

nixel2007 commented 1 year ago

Sounds reasonable for me.