refactor(lsp-manager): replace handler architecture with response registry and modular providers
* Remove legacy handlers system (BaseHandler, DefaultHandler, JavaHandler, PythonHandler, HandlerRegistry) * Introduce response_handlers module with ResponseRegistry for LSP response routing * Replace HandlerRegistry usage in LSPManager with ResponseRegistry * Convert LSPManagerUI client lifecycle to GObject signals * Remove GLib.idle_add usage in LSP client event dispatch * Move completion request logic into LSPServerEventsMixin * Replace provider.py and provider_response_cache.py with modular provider/ package * Simplify plugin wiring via response_registry.set_event_hub() This refactor decouples response handling, simplifies event flow, and prepares the LSP manager for easier language-specific extensions.
This commit is contained in:
31
plugins/code/ui/lsp_manager/response_handlers/base.py
Normal file
31
plugins/code/ui/lsp_manager/response_handlers/base.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# Python imports
|
||||
from abc import ABC
|
||||
|
||||
# Lib imports
|
||||
|
||||
# Application imports
|
||||
|
||||
|
||||
|
||||
class BaseHandler:
|
||||
def __init__(self):
|
||||
self.context = None
|
||||
self.response_cache = None
|
||||
|
||||
|
||||
def set_context(self, context):
|
||||
self.context = context
|
||||
|
||||
def set_response_cache(self, response_cache):
|
||||
self.response_cache = response_cache
|
||||
|
||||
@property
|
||||
def emit(self):
|
||||
return self.context.emit
|
||||
|
||||
@property
|
||||
def emit_to(self):
|
||||
return self.context.emit_to
|
||||
|
||||
def handle(self, method: str, response, controller):
|
||||
pass
|
||||
Reference in New Issue
Block a user