Claus Ibsen created CAMEL-25219:
-----------------------------------

             Summary: camel-jbang - TUI Source tab completion for the simple 
language
                 Key: CAMEL-25219
                 URL: https://issues.apache.org/jira/browse/CAMEL-25219
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen


The TUI Source editor completes endpoint uris (component names, options, 
values) in YAML routes, and since CAMEL-25208 in Java strings and XML uri 
attributes. Simple expressions get no completion, although they are where 
models and humans make most mistakes (${headers.foo} vs ${header.foo}, 
${exchangeProperty.x}, ${date:now:yyyyMMdd}, operators).

Add Tab completion for simple expressions in the Source editor, for all three 
DSLs:
* Where: YAML (simple: / expression: under a simple language, log message:), 
Java (the string given to simple(...), .simple("..."), log("..."), and toD 
uris), XML (<simple> elements, the message attribute of <log>).
* What: after ${ the functions of the simple language (body, header.x, 
exchangeProperty.x, variable.x, date:..., random, bean:..., the built-in 
functions with their arguments), with the documentation of each; inside 
${header. the header names known from the route (setHeader names, and the 
headers of the components the route uses, from the catalog); after a function, 
the operators valid in a predicate (==, contains, regex, in, ...) where the EIP 
takes a predicate.
* How: the function list from the catalog (the simple language model, as 
camel_catalog_doc simple has it), the context read from the line alone as 
EndpointUriContext does for uris (it must work while the file does not parse), 
the predicate/expression context from the model (RouteNodes) when it parses.
* The quick doc panel could show the documentation of the function the cursor 
is on.

Tests in camel-jbang-plugin-tui for each DSL; the TUI help (source.md) and the 
TUI doc page updated.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to