Moved plugins and refactor command system

- Moved plugins to apropriate sub folders
- Refactor command system with new add_command method and rename GetCommandSystemEvent to GetNewCommandSystemEvent
- Add RegisterCommandEvent for dynamic command registration
- Change footer container orientation to VERTICAL
- Add search-highlight tag to source buffer
- Add file change detection (deleted, externally modified) in source_file
- Add JSON prettify option to source view popup menu
- Enable hexpand on VTE widget
- Update plugins_controller_mixin to use widget_registry
This commit is contained in:
2026-02-18 23:49:01 -06:00
parent 2819598ae2
commit 61b8bbc5fa
89 changed files with 850 additions and 1029 deletions

View File

@@ -5,8 +5,9 @@
from .code_event import CodeEvent
from .register_provider_event import RegisterProviderEvent
from .register_command_event import RegisterCommandEvent
from .get_command_system_event import GetCommandSystemEvent
from .get_new_command_system_event import GetNewCommandSystemEvent
from .request_completion_event import RequestCompletionEvent
from .cursor_moved_event import CursorMovedEvent
from .modified_changed_event import ModifiedChangedEvent

View File

@@ -9,5 +9,5 @@ from .code_event import CodeEvent
@dataclass
class GetCommandSystemEvent(CodeEvent):
class GetNewCommandSystemEvent(CodeEvent):
...

View File

@@ -0,0 +1,20 @@
# Python imports
from dataclasses import dataclass, field
# Lib imports
import gi
gi.require_version('GtkSource', '4')
from gi.repository import GtkSource
# Application imports
from ..base_event import BaseEvent
@dataclass
class RegisterCommandEvent(BaseEvent):
command_name: str = ""
command: callable = None
binding_mode: str = ""
binding: str = ""

View File

@@ -15,11 +15,11 @@ from .dto import code
class EventFactory(Singleton):
def __init__(self):
self._event_classes: Dict[str, Type[BaseEvent]] = {}
self._auto_register_events( code.__dict__.items() )
def register_event(self, event_type: str, event_class: Type[BaseEvent]):
self._event_classes[event_type] = event_class