* 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.
32 lines
569 B
Python
32 lines
569 B
Python
# 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
|