forked from qt-creator/qt-creator
LanguageServerProtocol: remove IContent
Do not pretend to support multiple message types, while no other messages are actually implemented by us or even known to exist in the wild. Change-Id: I49ee2118b2e10f265ac641c195df8a9e5c97951c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -101,7 +101,7 @@ public:
|
||||
QString name() const;
|
||||
|
||||
enum class SendDocUpdates { Send, Ignore };
|
||||
void sendContent(const LanguageServerProtocol::IContent &content,
|
||||
void sendMessage(const LanguageServerProtocol::JsonRpcMessage &message,
|
||||
SendDocUpdates sendUpdates = SendDocUpdates::Send);
|
||||
|
||||
void cancelRequest(const LanguageServerProtocol::MessageId &id);
|
||||
@@ -226,17 +226,17 @@ protected:
|
||||
void setError(const QString &message);
|
||||
void setProgressTitleForToken(const LanguageServerProtocol::ProgressToken &token,
|
||||
const QString &message);
|
||||
void handleContent(const LanguageServerProtocol::JsonRpcMessage &message);
|
||||
void handleMessage(const LanguageServerProtocol::JsonRpcMessage &message);
|
||||
virtual void handleDiagnostics(const LanguageServerProtocol::PublishDiagnosticsParams ¶ms);
|
||||
virtual DiagnosticManager *createDiagnosticManager();
|
||||
|
||||
private:
|
||||
void sendContentNow(const LanguageServerProtocol::IContent &content);
|
||||
void sendMessageNow(const LanguageServerProtocol::JsonRpcMessage &message);
|
||||
void handleResponse(const LanguageServerProtocol::MessageId &id,
|
||||
const LanguageServerProtocol::IContent &content);
|
||||
const LanguageServerProtocol::JsonRpcMessage &message);
|
||||
void handleMethod(const QString &method,
|
||||
const LanguageServerProtocol::MessageId &id,
|
||||
const LanguageServerProtocol::IContent &content);
|
||||
const LanguageServerProtocol::JsonRpcMessage &message);
|
||||
|
||||
void initializeCallback(const LanguageServerProtocol::InitializeRequest::Response &initResponse);
|
||||
void shutDownCallback(const LanguageServerProtocol::ShutdownRequest::Response &shutdownResponse);
|
||||
@@ -268,10 +268,6 @@ private:
|
||||
virtual QTextCursor adjustedCursorForHighlighting(const QTextCursor &cursor,
|
||||
TextEditor::TextDocument *doc);
|
||||
|
||||
using ContentHandler = std::function<void(const QByteArray &, QTextCodec *, QString &,
|
||||
LanguageServerProtocol::ResponseHandlers,
|
||||
LanguageServerProtocol::MethodHandler)>;
|
||||
|
||||
State m_state = Uninitialized;
|
||||
QHash<LanguageServerProtocol::MessageId,
|
||||
LanguageServerProtocol::ResponseHandler::Callback> m_responseHandlers;
|
||||
|
||||
Reference in New Issue
Block a user