Claus Ibsen created CAMEL-24287:
-----------------------------------
Summary: camel-jbang-tui: Add plain text editor in source viewer
for quick prototyping
Key: CAMEL-24287
URL: https://issues.apache.org/jira/browse/CAMEL-24287
Project: Camel
Issue Type: New Feature
Components: camel-jbang
Reporter: Claus Ibsen
The TUI source viewer currently displays source files (YAML routes,
application.properties, Java DSL, etc.) in read-only mode with syntax
highlighting.
When running in dev mode (or from a local folder), it would be useful to toggle
into an edit mode for quick and dirty prototyping - making small changes to
files like application.properties, YAML routes, or Java source without needing
an external editor or IDE.
This is NOT intended as a full IDE or coding assistant - just a simple plain
text editor for rapid prototyping directly in the terminal.
h3. Proposed approach
* Toggle between view mode (current, with syntax highlighting) and edit mode
(plain text via TextArea widget)
* Press a key (e.g. {{e}}) to enter edit mode, {{Esc}} to cancel, {{F5}} to save
* Only available when running in dev mode or from a local folder (not for
remote/attached processes)
* Plain text editing without syntax highlighting (highlighting is shown when
switching back to view mode)
* Line numbers shown in edit mode
* Camel dev mode will auto-reload the changed files after save
The TamboUI TextArea widget already provides the basic editing primitives
needed: multi-line text, cursor movement, insertion/deletion, scrolling, and
line numbers. No TamboUI framework changes are required for the initial version.
h3. Future improvements (separate tickets)
* Undo/redo support (requires TamboUI TextAreaState changes)
* Text selection and copy/cut (requires TamboUI changes)
* Syntax highlighting in edit mode
* Search/replace in edit mode
--
This message was sent by Atlassian Jira
(v8.20.10#820010)