♻️ 使用module重构所有代码

This commit is contained in:
csh
2025-12-07 23:07:03 +08:00
parent 549f1d1b0a
commit f7d5a74615
369 changed files with 2272844 additions and 2202476 deletions
@@ -1,26 +0,0 @@
#include <spdlog/spdlog.h>
#include "./event.hpp"
#include "../../protocol/transform/facade.hpp"
namespace lsp::provider::telemetry
{
std::string Event::GetMethod() const
{
return "telemetry/event";
}
std::string Event::GetProviderName() const
{
return "TelemetryEvent";
}
void Event::HandleNotification(const protocol::NotificationMessage& notification, [[maybe_unused]] ExecutionContext& context)
{
spdlog::debug("TelemetryEventProvider: Handling notification for method {}", notification.method);
// TODO: Implement the actual notification handling logic
// 1. Parse notification parameters
// 2. Update appropriate services/state
// 3. Trigger any necessary side effects
}
}
@@ -0,0 +1,47 @@
module;
export module lsp.provider.telemetry.event;
import spdlog;
import std;
import lsp.protocol;
import lsp.codec.facade;
import lsp.provider.base.interface;
export namespace lsp::provider::telemetry
{
class Event : public INotificationProvider
{
public:
Event() = default;
std::string GetMethod() const override;
std::string GetProviderName() const override;
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
};
}
namespace lsp::provider::telemetry
{
std::string Event::GetMethod() const
{
return "telemetry/event";
}
std::string Event::GetProviderName() const
{
return "TelemetryEvent";
}
void Event::HandleNotification(const protocol::NotificationMessage& notification, [[maybe_unused]] ExecutionContext& context)
{
spdlog::debug("TelemetryEventProvider: Handling notification for method {}", notification.method);
// TODO: Implement the actual notification handling logic
// 1. Parse notification parameters
// 2. Update appropriate services/state
// 3. Trigger any necessary side effects
}
}
@@ -1,16 +0,0 @@
#pragma once
#include <unordered_map>
#include "../base/interface.hpp"
namespace lsp::provider::telemetry
{
class Event : public INotificationProvider
{
public:
Event() = default;
std::string GetMethod() const override;
std::string GetProviderName() const override;
void HandleNotification(const protocol::NotificationMessage& notification, ExecutionContext& context) override;
};
}