forked from qt-creator/qt-creator
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:
@@ -45,18 +45,16 @@ public:
|
||||
LspLogMessage();
|
||||
LspLogMessage(MessageSender sender,
|
||||
const QTime &time,
|
||||
const LanguageServerProtocol::BaseMessage &message);
|
||||
const LanguageServerProtocol::JsonRpcMessage &message);
|
||||
QTime time;
|
||||
LanguageServerProtocol::BaseMessage message;
|
||||
LanguageServerProtocol::JsonRpcMessage message;
|
||||
|
||||
LanguageServerProtocol::MessageId id() const;
|
||||
QString displayText() const;
|
||||
QJsonObject &json() const;
|
||||
|
||||
private:
|
||||
mutable Utils::optional<LanguageServerProtocol::MessageId> m_id;
|
||||
mutable Utils::optional<QString> m_displayText;
|
||||
mutable Utils::optional<QJsonObject> m_json;
|
||||
};
|
||||
|
||||
struct Capabilities
|
||||
@@ -76,7 +74,7 @@ public:
|
||||
|
||||
void log(const LspLogMessage::MessageSender sender,
|
||||
const QString &clientName,
|
||||
const LanguageServerProtocol::BaseMessage &message);
|
||||
const LanguageServerProtocol::JsonRpcMessage &message);
|
||||
void clientInitialized(const QString &clientName,
|
||||
const LanguageServerProtocol::ServerCapabilities &capabilities);
|
||||
void updateCapabilities(const QString &clientName,
|
||||
|
||||
Reference in New Issue
Block a user