refactor
This commit is contained in:
parent
0c4619261d
commit
e2d88085f0
|
|
@ -5,12 +5,26 @@
|
|||
|
||||
namespace lsp::core
|
||||
{
|
||||
RequestDispatcher::RequestDispatcher()
|
||||
{
|
||||
// 预创建 lifecycle callback,避免每次调用时都创建新的 lambda
|
||||
context_lifecycle_callback_ = [this](providers::ServerLifecycleEvent event) {
|
||||
NotifyAllLifecycleListeners(event);
|
||||
};
|
||||
}
|
||||
|
||||
void RequestDispatcher::SetRequestScheduler(scheduler::RequestScheduler* scheduler)
|
||||
{
|
||||
scheduler_ = scheduler;
|
||||
spdlog::debug("RequestScheduler set in dispatcher");
|
||||
}
|
||||
|
||||
void RequestDispatcher::SetDocumentManager(services::DocumentManager* document_manager)
|
||||
{
|
||||
document_manager_ = document_manager;
|
||||
spdlog::debug("DocumentManager is set in dispatcher");
|
||||
}
|
||||
|
||||
void RequestDispatcher::RegisterRequestProvider(std::shared_ptr<providers::IRequestProvider> provider)
|
||||
{
|
||||
std::unique_lock<std::shared_mutex> lock(providers_mutex_);
|
||||
|
|
@ -29,7 +43,7 @@ namespace lsp::core
|
|||
spdlog::info("Registered notification provider '{}' for method: {}", provider->GetProviderName(), method);
|
||||
}
|
||||
|
||||
void RequestDispatcher::RegisterLifecycleCallback(LifecycleCallback callback)
|
||||
void RequestDispatcher::RegisterLifecycleCallback(providers::LifecycleCallback callback)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(callbacks_mutex_);
|
||||
lifecycle_callbacks_.push_back(std::move(callback));
|
||||
|
|
@ -38,12 +52,7 @@ namespace lsp::core
|
|||
|
||||
std::string RequestDispatcher::Dispatch(const protocol::RequestMessage& request)
|
||||
{
|
||||
providers::ProviderContext context(
|
||||
scheduler_,
|
||||
[this](ServerLifecycleEvent event)
|
||||
{
|
||||
NotifyAllLifecycleListeners(event);
|
||||
});
|
||||
providers::ExecutionContext context(scheduler_, context_lifecycle_callback_, document_manager_);
|
||||
|
||||
std::shared_lock<std::shared_mutex> lock(providers_mutex_);
|
||||
auto it = providers_.find(request.method);
|
||||
|
|
@ -67,16 +76,9 @@ namespace lsp::core
|
|||
|
||||
void RequestDispatcher::Dispatch(const protocol::NotificationMessage& notification)
|
||||
{
|
||||
// 创建 provider context
|
||||
providers::ProviderContext context(
|
||||
scheduler_,
|
||||
[this](ServerLifecycleEvent event)
|
||||
{
|
||||
NotifyAllLifecycleListeners(event);
|
||||
});
|
||||
providers::ExecutionContext context(scheduler_, context_lifecycle_callback_, document_manager_);
|
||||
|
||||
std::shared_lock<std::shared_mutex> lock(notification_providers_mutex_);
|
||||
|
||||
// 先尝试精确匹配
|
||||
auto it = notification_providers_.find(notification.method);
|
||||
if (it != notification_providers_.end())
|
||||
|
|
@ -140,26 +142,26 @@ namespace lsp::core
|
|||
return providers::IRequestProvider::BuildErrorResponseMessage(request, code, message);
|
||||
}
|
||||
|
||||
void RequestDispatcher::NotifyAllLifecycleListeners(ServerLifecycleEvent event)
|
||||
void RequestDispatcher::NotifyAllLifecycleListeners(providers::ServerLifecycleEvent event)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(callbacks_mutex_);
|
||||
|
||||
std::string event_name;
|
||||
switch (event)
|
||||
{
|
||||
case ServerLifecycleEvent::kInitializing:
|
||||
case providers::ServerLifecycleEvent::kInitializing:
|
||||
event_name = "Initializing";
|
||||
break;
|
||||
case ServerLifecycleEvent::kInitialized:
|
||||
case providers::ServerLifecycleEvent::kInitialized:
|
||||
event_name = "Initialized";
|
||||
break;
|
||||
case ServerLifecycleEvent::kInitializeFailed:
|
||||
case providers::ServerLifecycleEvent::kInitializeFailed:
|
||||
event_name = "InitializeFailed";
|
||||
break;
|
||||
case ServerLifecycleEvent::kShuttingDown:
|
||||
case providers::ServerLifecycleEvent::kShuttingDown:
|
||||
event_name = "ShuttingDown";
|
||||
break;
|
||||
case ServerLifecycleEvent::kShutdown:
|
||||
case providers::ServerLifecycleEvent::kShutdown:
|
||||
event_name = "Shutdown";
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,21 +8,19 @@
|
|||
namespace lsp::core
|
||||
{
|
||||
|
||||
using ServerLifecycleEvent = providers::ServerLifecycleEvent;
|
||||
using LifecycleCallback = providers::LifecycleCallback;
|
||||
|
||||
class RequestDispatcher
|
||||
{
|
||||
public:
|
||||
RequestDispatcher() = default;
|
||||
RequestDispatcher();
|
||||
~RequestDispatcher() = default;
|
||||
|
||||
void SetRequestScheduler(scheduler::RequestScheduler* scheduler);
|
||||
void SetDocumentManager(services::DocumentManager* document_manager);
|
||||
|
||||
void RegisterRequestProvider(std::shared_ptr<providers::IRequestProvider> provider);
|
||||
void RegisterNotificationProvider(std::shared_ptr<providers::INotificationProvider> provider);
|
||||
|
||||
void RegisterLifecycleCallback(LifecycleCallback callback);
|
||||
void RegisterLifecycleCallback(providers::LifecycleCallback callback);
|
||||
|
||||
std::string Dispatch(const protocol::RequestMessage& request);
|
||||
void Dispatch(const protocol::NotificationMessage& notification);
|
||||
|
|
@ -36,7 +34,7 @@ namespace lsp::core
|
|||
std::string BuildErrorResponseMessage(const protocol::RequestMessage& request, protocol::ErrorCode code, const std::string& message);
|
||||
|
||||
private:
|
||||
void NotifyAllLifecycleListeners(ServerLifecycleEvent event);
|
||||
void NotifyAllLifecycleListeners(providers::ServerLifecycleEvent event);
|
||||
std::string HandleUnknownRequest(const protocol::RequestMessage& request);
|
||||
void HandleUnknownNotification(const protocol::NotificationMessage& notification);
|
||||
|
||||
|
|
@ -48,9 +46,13 @@ namespace lsp::core
|
|||
std::unordered_map<std::string, std::shared_ptr<providers::INotificationProvider>> notification_providers_;
|
||||
|
||||
std::mutex callbacks_mutex_;
|
||||
std::vector<LifecycleCallback> lifecycle_callbacks_;
|
||||
std::vector<providers::LifecycleCallback> lifecycle_callbacks_;
|
||||
|
||||
providers::LifecycleCallback context_lifecycle_callback_;
|
||||
|
||||
// 服务引用
|
||||
scheduler::RequestScheduler* scheduler_ = nullptr;
|
||||
services::DocumentManager* document_manager_ = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <spdlog/spdlog.h>
|
||||
#ifdef _WIN32
|
||||
#include <io.h>
|
||||
|
|
@ -8,6 +9,7 @@
|
|||
#include "../provider/base/provider_registry.hpp"
|
||||
#include "../protocol/transform/facade.hpp"
|
||||
#include "../scheduler/request_scheduler.hpp"
|
||||
#include "../services/document.hpp"
|
||||
#include "./server.hpp"
|
||||
|
||||
namespace lsp::core
|
||||
|
|
@ -17,17 +19,8 @@ namespace lsp::core
|
|||
{
|
||||
spdlog::info("Initializing LSP server with {} worker threads", concurrency);
|
||||
|
||||
dispatcher_.SetRequestScheduler(&scheduler_);
|
||||
|
||||
dispatcher_.RegisterLifecycleCallback(
|
||||
[this](providers::ServerLifecycleEvent event) {
|
||||
OnLifecycleEvent(event);
|
||||
});
|
||||
providers::RegisterAllProviders(dispatcher_);
|
||||
|
||||
scheduler_.SetResponseCallback([this](const std::string& response) {
|
||||
SendResponse(response);
|
||||
});
|
||||
InitializeCoreServices();
|
||||
InitializeExtensionServices();
|
||||
|
||||
spdlog::debug("LSP server initialized with {} providers.", dispatcher_.GetAllSupportedMethods().size());
|
||||
}
|
||||
|
|
@ -209,30 +202,30 @@ namespace lsp::core
|
|||
spdlog::debug("Received response - id: {}", id_str);
|
||||
}
|
||||
|
||||
void LspServer::OnLifecycleEvent(ServerLifecycleEvent event)
|
||||
void LspServer::OnLifecycleEvent(providers::ServerLifecycleEvent event)
|
||||
{
|
||||
switch (event)
|
||||
{
|
||||
case ServerLifecycleEvent::kInitializing:
|
||||
case providers::ServerLifecycleEvent::kInitializing:
|
||||
spdlog::info("Server initializing...");
|
||||
break;
|
||||
|
||||
case ServerLifecycleEvent::kInitialized:
|
||||
case providers::ServerLifecycleEvent::kInitialized:
|
||||
is_initialized_ = true;
|
||||
spdlog::info("Server initialized successfully");
|
||||
break;
|
||||
|
||||
case ServerLifecycleEvent::kInitializeFailed:
|
||||
case providers::ServerLifecycleEvent::kInitializeFailed:
|
||||
is_initialized_ = false;
|
||||
spdlog::error("Server initialization failed");
|
||||
break;
|
||||
|
||||
case ServerLifecycleEvent::kShuttingDown:
|
||||
case providers::ServerLifecycleEvent::kShuttingDown:
|
||||
is_shutting_down_ = true;
|
||||
spdlog::info("Server entering shutdown state");
|
||||
break;
|
||||
|
||||
case ServerLifecycleEvent::kShutdown:
|
||||
case providers::ServerLifecycleEvent::kShutdown:
|
||||
is_shutting_down_ = true;
|
||||
spdlog::info("Server shutdown complete");
|
||||
break;
|
||||
|
|
@ -284,6 +277,27 @@ namespace lsp::core
|
|||
spdlog::trace("Response sent - body: {}", response);
|
||||
}
|
||||
|
||||
void LspServer::InitializeCoreServices()
|
||||
{
|
||||
dispatcher_.SetRequestScheduler(&scheduler_);
|
||||
|
||||
dispatcher_.RegisterLifecycleCallback(
|
||||
[this](providers::ServerLifecycleEvent event) {
|
||||
OnLifecycleEvent(event);
|
||||
});
|
||||
providers::RegisterAllProviders(dispatcher_);
|
||||
|
||||
scheduler_.SetResponseCallback([this](const std::string& response) {
|
||||
SendResponse(response);
|
||||
});
|
||||
}
|
||||
|
||||
void LspServer::InitializeExtensionServices()
|
||||
{
|
||||
document_manager_ = std::make_unique<services::DocumentManager>();
|
||||
dispatcher_.SetDocumentManager(document_manager_.get());
|
||||
}
|
||||
|
||||
void LspServer::SendError(const protocol::RequestMessage& request, protocol::ErrorCode code, const std::string& message)
|
||||
{
|
||||
spdlog::warn("Sending error response - method: {}, code: {}, message: {}", request.method, static_cast<int>(code), message);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include "./dispacther.hpp"
|
||||
|
|
@ -43,13 +44,19 @@ namespace lsp::core
|
|||
void HandleCancelRequest(const protocol::NotificationMessage& notification);
|
||||
|
||||
private:
|
||||
void InitializeCoreServices();
|
||||
void InitializeExtensionServices();
|
||||
void SendError(const protocol::RequestMessage& request, protocol::ErrorCode code, const std::string& message);
|
||||
void SendStateError(const protocol::RequestMessage& request);
|
||||
|
||||
private:
|
||||
// 核心组件-必需的,生命周期和LspServer一致
|
||||
RequestDispatcher dispatcher_;
|
||||
scheduler::RequestScheduler scheduler_;
|
||||
|
||||
// 可选/扩展组件 -- 所以用智能指针
|
||||
std::unique_ptr<services::DocumentManager> document_manager_;
|
||||
|
||||
std::atomic<bool> is_initialized_ = false;
|
||||
std::atomic<bool> is_shutting_down_ = false;
|
||||
std::mutex output_mutex_;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
#include <spdlog/spdlog.h>
|
||||
#include "../../protocol/protocol.hpp"
|
||||
#include "../../scheduler/request_scheduler.hpp"
|
||||
#include "../../services/document.hpp"
|
||||
|
||||
namespace lsp::providers
|
||||
{
|
||||
|
|
@ -17,7 +18,27 @@ namespace lsp::providers
|
|||
|
||||
using LifecycleCallback = std::function<void(ServerLifecycleEvent)>;
|
||||
|
||||
class ProviderContext;
|
||||
class ExecutionContext
|
||||
{
|
||||
public:
|
||||
ExecutionContext(scheduler::RequestScheduler* scheduler, LifecycleCallback lifecycle_callback, services::DocumentManager* document_manager = nullptr) :
|
||||
scheduler_(scheduler), lifecycle_callback_(lifecycle_callback), document_manager_(document_manager) {}
|
||||
|
||||
scheduler::RequestScheduler* GetScheduler() const { return scheduler_; }
|
||||
|
||||
services::DocumentManager* GetDocumentManager() const { return document_manager_; }
|
||||
|
||||
void TriggerLifecycleEvent(ServerLifecycleEvent event) const
|
||||
{
|
||||
if (lifecycle_callback_)
|
||||
lifecycle_callback_(event);
|
||||
}
|
||||
|
||||
private:
|
||||
scheduler::RequestScheduler* scheduler_;
|
||||
LifecycleCallback lifecycle_callback_;
|
||||
services::DocumentManager* document_manager_;
|
||||
};
|
||||
|
||||
// LSP请求提供者接口基类
|
||||
class IProvider
|
||||
|
|
@ -38,7 +59,7 @@ namespace lsp::providers
|
|||
virtual ~IRequestProvider() = default;
|
||||
|
||||
// 处理LSP请求
|
||||
virtual std::string ProvideResponse(const protocol::RequestMessage& request, ProviderContext& context) = 0;
|
||||
virtual std::string ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context) = 0;
|
||||
static std::string BuildErrorResponseMessage(const protocol::RequestMessage& request, protocol::ErrorCode code, const std::string& message);
|
||||
};
|
||||
|
||||
|
|
@ -49,25 +70,7 @@ namespace lsp::providers
|
|||
virtual ~INotificationProvider() = default;
|
||||
|
||||
// 处理LSP通知
|
||||
virtual void HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context) = 0;
|
||||
virtual void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) = 0;
|
||||
};
|
||||
|
||||
class ProviderContext
|
||||
{
|
||||
public:
|
||||
ProviderContext(scheduler::RequestScheduler* scheduler, LifecycleCallback lifecycle_callback) :
|
||||
scheduler_(scheduler), lifecycle_callback_(lifecycle_callback) {}
|
||||
|
||||
scheduler::RequestScheduler* GetScheduler() const { return scheduler_; }
|
||||
|
||||
void TriggerLifecycleEvent(ServerLifecycleEvent event) const
|
||||
{
|
||||
if (lifecycle_callback_)
|
||||
lifecycle_callback_(event);
|
||||
}
|
||||
|
||||
private:
|
||||
scheduler::RequestScheduler* scheduler_;
|
||||
LifecycleCallback lifecycle_callback_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace lsp::providers::cancel_request
|
|||
return "CancelRequestProvider";
|
||||
}
|
||||
|
||||
void CancelRequestProvider::HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context)
|
||||
void CancelRequestProvider::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -11,6 +11,6 @@ namespace lsp::providers::cancel_request
|
|||
public:
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context) override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace lsp::providers::exit
|
|||
return "ExitProvider";
|
||||
}
|
||||
|
||||
void ExitProvider::HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context)
|
||||
void ExitProvider::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
// static_cast<void>(context);
|
||||
spdlog::debug("ExitProvider: Providing response for method {}", notification.method);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@ namespace lsp::providers::exit
|
|||
public:
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context) override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace lsp::providers::initialize
|
|||
return "InitializeProvider";
|
||||
}
|
||||
|
||||
std::string InitializeProvider::ProvideResponse(const protocol::RequestMessage& request, ProviderContext& context)
|
||||
std::string InitializeProvider::ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context)
|
||||
{
|
||||
spdlog::debug("InitializeProvider: Providing response for method {}", request.method);
|
||||
protocol::ResponseMessage response;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace lsp::providers::initialize
|
|||
{
|
||||
public:
|
||||
InitializeProvider() = default;
|
||||
std::string ProvideResponse(const protocol::RequestMessage& request, ProviderContext& context) override;
|
||||
std::string ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context) override;
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace lsp::providers::initialized
|
|||
return "InitializedProvider";
|
||||
}
|
||||
|
||||
void InitializedProvider::HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context)
|
||||
void InitializedProvider::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
static_cast<void>(context); // 如果不需要上下文,可以忽略
|
||||
spdlog::debug("InitializeProvider: Providing response for method {}", notification.method);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ namespace lsp::providers::initialized
|
|||
InitializedProvider() = default;
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context) override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace lsp::providers::shutdown
|
|||
return "ShutdownProvider";
|
||||
}
|
||||
|
||||
std::string ShutdownProvider::ProvideResponse(const protocol::RequestMessage& request, ProviderContext& context)
|
||||
std::string ShutdownProvider::ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context)
|
||||
{
|
||||
spdlog::debug("ShutdownProvider: Providing response for method {}", request.method);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ namespace lsp::providers::shutdown
|
|||
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
std::string ProvideResponse(const protocol::RequestMessage& request, ProviderContext& context) override;
|
||||
std::string ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace lsp::providers::text_document
|
|||
return "CompletionProvider";
|
||||
}
|
||||
|
||||
std::string CompletionProvider::ProvideResponse(const protocol::RequestMessage& request, ProviderContext& context)
|
||||
std::string CompletionProvider::ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context)
|
||||
{
|
||||
static_cast<void>(context);
|
||||
spdlog::debug("CompletionProvider: Providing response for method {}", request.method);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace lsp::providers::text_document
|
|||
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
std::string ProvideResponse(const protocol::RequestMessage& request, ProviderContext& context) override;
|
||||
std::string ProvideResponse(const protocol::RequestMessage& request, ExecutionContext& context) override;
|
||||
|
||||
private:
|
||||
// 构建完整的补全响应
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace lsp::providers::text_document
|
|||
return "DidChangeProvider";
|
||||
}
|
||||
|
||||
void DidChangeProvider::HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context)
|
||||
void DidChangeProvider::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
static_cast<void>(context);
|
||||
spdlog::debug("DidChangeProvider: Providing response for method {}", notification.method);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ namespace lsp::providers::text_document
|
|||
DidChangeProvider() = default;
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context) override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace lsp::providers::text_document
|
|||
return "DidOpenProvider";
|
||||
}
|
||||
|
||||
void DidOpenProvider::HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context)
|
||||
void DidOpenProvider::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
static_cast<void>(context);
|
||||
spdlog::debug("DidOpenProvider: Providing response for method {}", notification.method);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ namespace lsp::providers::text_document
|
|||
DidOpenProvider() = default;
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context) override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace lsp::providers::set_trace
|
|||
return "SetTraceProvider";
|
||||
}
|
||||
|
||||
void SetTraceProvider::HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context)
|
||||
void SetTraceProvider::HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context)
|
||||
{
|
||||
static_cast<void>(context);
|
||||
spdlog::debug("SetTraceProvider: Providing response for method {}", notification.method);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ namespace lsp::providers::set_trace
|
|||
SetTraceProvider() = default;
|
||||
std::string GetMethod() const override;
|
||||
std::string GetProviderName() const override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ProviderContext& context) override;
|
||||
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue