Claus Ibsen created CAMEL-25240:
-----------------------------------
Summary: camel-jbang - source editor completion for XML DSL
elements and attributes
Key: CAMEL-25240
URL: https://issues.apache.org/jira/browse/CAMEL-25240
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
The source editor of camel-jbang completes endpoint uris in XML routes (the uri
attribute, CAMEL-25208) and simple expressions (CAMEL-25219). Everything else
in an XML route gets no completion, while YAML routes have EIP names, EIP
options and their values from the catalog.
Add Tab completion for the XML DSL, from the same catalog data the YAML
completion uses:
* after < : the EIP elements allowed inside the parent element (the outputs of
a step, the expression languages where an expression goes, when/otherwise in a
choice...);
* inside a start tag: the attributes of that EIP (its options of kind
attribute), without the ones already given;
* after attr=" : the values of the attribute (enums, true/false, property
placeholders), as YAML values have.
Read the parent element and the tag being typed from the lines above the
cursor, so it works while the file does not parse (as EndpointUriContext and
SimpleCompletionContext do).
Tests for each kind in camel-jbang-plugin-tui; help (source.md) and the source
editor doc page updated.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)