Plugin manager - for feedback#42
Open
pplupo wants to merge 65 commits into
Open
Conversation
This commit introduces a premium editor WLX plugin based on Native Qt6 and KDE's KTextEditor framework. It brings full syntax highlighting, code folding, and advanced editing capabilities to Double Commander's viewer panel without LCL compatibility crashes on Wayland. Committed files: - Source code (src/) wrapping KTextEditor - CMakeLists.txt for build configuration - README.md with screenshots - defects.md tracking known issues and resolutions - Screenshot assets (kate_java.png, kate_md.png, kate_py.png) - Integration into root build.sh for automated release packaging
…yles, preserve selection, and fix Proper/Title Case logic
…nd highlighting - Export ListSetDefaultParams to retrieve and bind the host's INI file path. - Add HighlightRule structure and fast RE2-based line matching directly on memory-mapped offsets. - Create Highlighting Rules SettingsDialog modal with an inline-colored rules list. - Enable ExtendedSelection on the rules list to support deleting or moving multiple rules up/down, maintaining selection state using QItemSelectionModel. - Connect double-click on any rule row to open the editing window. - Write Foreground/Background labels above color picker buttons in RuleDialog. - Implement session persistence under [HighlightRules] in the INI file. - Prevent default rules from overriding empty rule configurations on restart. - Add context-aware "Add Default Rules" button to prepend default log levels relative to the current selection. - Create sample.log matching each level for diagnostics.
Manually merged unique changes from all editor-related branches: - editor-features: focus management (NoFocus on menuBar, focus restoration, focus-stealing prevention), Save/Save As/Save Copy As actions with toolbar button, Print action with toolbar button, font zoom controls (Ctrl++/Ctrl+-/ Ctrl+0) with native KTE action fallback, Force RTL Direction toggle, Ctrl+Shift+S Save As shortcut precedence fix, QTimer-based focus restoration - kate-case-conversion: Capitalization submenu replacing flat menu items, improved Title Case with minor-word handling, fixed Proper Case (toLower instead of preserve), renamed snail_case to snake_case, added PascalCase, SCREAMING_SNAKE_CASE, kebab-case, Sentence case, SCREAMING-KEBAB-CASE, dot.case, path/case, replaceSelectionPreservingRange helper to restore selection after text replacement - fix-redo-and-write-lock: Ctrl+Shift+Z redo shortcut (in addition to Ctrl+Y), extracted toggleReadOnly() helper, Alt+Shift+R shortcut for read-only toggle, fixed double-trigger bug by switching QAction::toggled to QAction::triggered, added shortcut labels to read-only menu action
…, and kate-case-conversion into kate base
Reusable static library for building Qt6 Wayland WLX plugins. Codifies focus management, toolbar, grid editing, find/replace, and encoding detection patterns into decoupled components. Components: - FocusManager: core framework with shortcut registry + optional undo - PluginToolBar: focus-safe QToolBar subclass - EditableGridWidget: QTableWidget wrapper with full undo/redo - FindReplacePanel: base find/replace UI (no scope) - ScopedFindReplacePanel: adds configurable scope combo box - EncodingUtils: encoding detection (enca) + conversion (glib) Namespace: QtWlPlugin Build: CMake, static library, C++20, Qt6
Dependency injection: constructor now takes QTableView* instead of creating a QTableWidget internally. view() replaces tableWidget(). All data access converted from QTableWidgetItem to QAbstractItemModel: - model()->data(index, Qt::EditRole) / model()->setData() - model()->insertRows() / removeRows() / insertColumns() / removeColumns() - model()->sort() for column sorting - model()->setHeaderData() for row number updates Undo commands (EditCellCommand, RowColCommand, DataSnapshotCommand) now hold QAbstractItemModel* and operate via QModelIndex. Consumers can inject QTableWidget (item-based convenience) or QTableView + any QAbstractItemModel (QStandardItemModel, QSqlTableModel, etc.) — zero code duplication. README updated with new API, dependency injection examples, and QTableView + QSqlTableModel usage example.
Introduce GridMode to EditableGridWidget constructor that controls the undo/memory strategy for all data mutations. GridMode::MemoryDocument (for QTableWidget, QStandardItemModel): - Full QUndoStack tracking for edits, inserts, deletes, sort - Sort snapshots entire table state into RAM for undo/redo - dataChanged interceptor stashes old values for EditCellCommand GridMode::LiveDatabase (for QSqlTableModel, transactional models): - Bypasses QUndoStack for insert/delete/sort operations - Sort calls model->sort() directly (SQL ORDER BY, no RAM snapshot) - Insert/delete call model->insertRows()/removeRows() directly - No dataChanged interceptor (avoids forcing lazy-loaded DB into RAM) - Context menus, drag-to-reorder, focus, shortcuts still fully shared This prevents catastrophic RAM explosion when sorting or snapshotting a multi-million row SQLite table that QSqlTableModel lazy-loads in 256-row chunks. Constructor signature: EditableGridWidget(QTableView*, GridMode, FocusManager*, QWidget*) New getter: GridMode mode() const
Qt6 WLX plugin for viewing and editing structured text files.
Built on wayland_qt_base platform (consumed as git submodule).
Engines:
- JsonEngine: flattens array-of-objects into grid, preserves types
- XmlEngine: auto-detects repeating child elements as rows
- IniEngine: section navigation list + 2-column Key/Value grid
Features:
- Full undo/redo (GridMode::MemoryDocument)
- ScopedFindReplacePanel with column/row scope filtering
- Encoding detection via enca (auto-converts non-UTF-8)
- Save (Ctrl+S), word wrap, grid lines toggles
- CBOR engine stubbed for future addition
Exports: ListLoad, ListCloseWindow, ListSendCommand, ListSearchText,
ListGetDetectString
Qt6 WLX plugin for viewing and editing SQLite database files.
Built on wayland_qt_base platform (consumed as git submodule).
Components:
- SqliteBackend: per-widget QSqlDatabase connection with unique names,
QSqlTableModel with OnManualSubmit editing strategy
- DbViewWidget: table/view selector combo, Submit/Revert toolbar actions,
row count display, Find panel (search-only, no replace)
Uses GridMode::LiveDatabase to avoid RAM snapshots on large databases.
Sorting delegates to SQL ORDER BY. Insert/delete go directly to model.
Exports: ListLoad, ListCloseWindow, ListSendCommand, ListSearchText,
ListGetDetectString
Uses Qt6 built-in QCborValue. Strategy: - Load: QCborValue::fromCbor() → toJsonValue() → flatten as JSON grid - Save: grid → JSON → QCborValue::fromJsonValue() → toCbor() Reuses the JSON array-of-objects flattening pattern without code duplication. Detect string updated: EXT="CBOR" added.
Major refactor from single-backend SQLite plugin to polymorphic multi-engine database viewer supporting: Architecture: - DbEngine abstract interface with factory dispatch by file extension - SqliteEngine: refactored from SqliteBackend, QSQLITE + QSqlTableModel - DuckDbEngine: native C++ API via FetchContent, DuckDbModel with LIMIT/OFFSET lazy loading - LevelDbEngine: FetchContent, directory detection via CURRENT file, iterator-based key counting - RocksDbEngine: optional (ENABLE_ROCKSDB=ON), same pattern as LevelDB - KeyValueModel: sliding window cache (~1000 entries), binary value detection with [Binary Data - X bytes] placeholder, hex view toggle, save/load binary value as file via context menu UI: - DbViewWidget is now engine-agnostic - Adaptive toolbar: shows/hides table selector and submit/revert based on engine capabilities - Engine label in toolbar (SQLite/DuckDB/LevelDB/RocksDB) - KV context menu: toggle hex view, save value as file, load from file CMake: - FetchContent for DuckDB v1.3.0 and LevelDB 1.23 - Optional RocksDB v9.11.2 via -DENABLE_ROCKSDB=ON - Detect string updated for .duckdb, .ldb, .sst extensions
New components: - FilterRowWidget: per-column QLineEdit filtering with auto-synced widths - PluginStatusBar: configurable bottom bar (encoding, format, rows, extras) - PluginSplitView: left-panel + right-content splitter (180px default) - ThemeManager: VS Code-inspired dark/light theme toggle via QSettings EditableGridWidget enhancements: - Copy cell / Copy row in context menu - Filters toggle (wired to FilterRowWidget) - Dark theme toggle (wired to ThemeManager) - setExtraContextMenuCallback() for plugin-specific entries (KV ops)
…tatusBar, PluginSplitView, ThemeManager)
Major rewrite for tree-based document navigation: TextFormatEngine: - New DocumentNode class representing hierarchical document structure - Root/children/grid-data model for all formats - Factory method detects format from file extension Engines rewritten for tree building: - JsonEngine: objects split into scalar grid + container children, tabular array detection - XmlEngine: DOM → tree, repeating siblings → tabular grid, attributes as @columns - CborEngine: CBOR → JSON delegation to JsonEngine - IniEngine: sections as tree nodes, Key|Value grid New engines: - YamlEngine (yaml-cpp via FetchContent): mappings/sequences → tree - TomlEngine (toml++ v3.4.0 via FetchContent): tables/arrays-of-tables → tree StructViewWidget: - QTreeView (left) + QTabWidget (Grid|Text) via PluginSplitView - Grid tab with FilterRowWidget, QSortFilterProxyModel - Text tab (read-only QPlainTextEdit, monospace) - PluginStatusBar with format/encoding/row count - ThemeManager dark/light toggle - Structural editing via grid, serialization back to original format Detect string updated for 14 extensions: JSON, XML, INI, CBOR, YAML, YML, TOML, CFG, CONF, SVG, XHTML, PLIST, DESKTOP, INF
…Bar, PluginSplitView, ThemeManager)
…robust undo/redo mapping
…der in structview
…engine cleanup; fix QSqlDatabase reference leak
…arents and owns the QTableView)
… WLX entry points
… WLX entry points
… with fflush; YAML parse diagnostics
…n header, always pixel-aligned
…embedded in header
… row count overlap
…ve Index and hide virtual headers)
…StructViewWidget to keep filters visible on virtual headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm working on a plugin manager. The idea is that a user can correlate the download link to an extension, and the manager can check for changes and suggest updates, with the possibility of rollbacks. The user can also make changes, disable, enable, etc., from the manager.
It is written thinking it could be part of doublecmd someday.