LanguageClient: Move the BaseMessage to JsonRpcMessage conversion

... to the client interface. JsonRpcMessages are the only messages used
so far and no other types of messages are currently used by any of the
supported Language Servers. If a client is going to need special message
parsing it can still implement a specialized client interface and
overwrite parseCurrentMessage. This is the preparation to move receiving
and parsing data passed to and from the language server out of the GUI
thread.

Change-Id: Ibd4cd95daab7efff947273ca9e7d457de0286f47
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2022-05-10 11:40:56 +02:00
parent 819d6ad753
commit 0b6bc0d187
12 changed files with 126 additions and 178 deletions

View File

@@ -424,9 +424,9 @@ void LanguageClientManager::openDocumentWithClient(TextEditor::TextDocument *doc
TextEditor::IOutlineWidgetFactory::updateOutline();
}
void LanguageClientManager::logBaseMessage(const LspLogMessage::MessageSender sender,
const QString &clientName,
const BaseMessage &message)
void LanguageClientManager::logJsonRpcMessage(const LspLogMessage::MessageSender sender,
const QString &clientName,
const LanguageServerProtocol::JsonRpcMessage &message)
{
instance()->m_inspector.log(sender, clientName, message);
}