Closed fwendland closed 2 years ago
at Xtext we implemented this nullimpl https://github.com/eclipse/xtext-core/commit/675a36aeb51bdb69f9a02021ede1983bc817b44a
Thank you for the suggestion. I've adopted it and now it's working again.
Can I suggest to change the default implementation of LanguageServer.getNotebookDocumentService()
to return a nullimpl? Or is this intended by design?
The Javadoc for the @JsonDelegate
annotation states that "If an annotated method returns null
then jsonrpc methods of the delegate are not considered". Therefore, I suggest to change the default implementation of the LanguageServer.getNotebookDocumentService()
method to return null
instead of throwing an UnsupportedOperationException
.
However, this would lead to the following message being logged: SEVERE: A delegate object is null, jsonrpc methods of 'public default org.eclipse.lsp4j.services.NotebookDocumentService org.eclipse.lsp4j.services.LanguageServer.getNotebookDocumentService()' are ignored
.
Given that returning null
is explicitly allowed by the annotation's contract, I think that this message should be either an INFO
or not logged at all (the latter would have been my preference).
WDYT?
I'd say debug logging might be ok. INFO and everything more severe is unreasonable.
I've tried to update to the new release v0.15.0. Unfortunatetly, I'm running into an exception when creating a server launcher:
Code:
My
CpgLanguageServer
implementsLanguageServer
. However, it's not implementing the newLanguageServer.getNotebookDocumentService()
and instead uses the default implementation. This causes the following exception:I would assume that the thrown
UnsupportedOperationException
from the default implementation would be ignored when searching for RPC methods.Is it mandatory to implement
LanguageServer.getNotebookDocumentService()
?