Claus Ibsen created CAMEL-25208:
-----------------------------------
Summary: camel-jbang - Camel validation and code assistance for
Java and XML DSL routes (model based)
Key: CAMEL-25208
URL: https://issues.apache.org/jira/browse/CAMEL-25208
Project: Camel
Issue Type: Improvement
Components: camel-jbang
Reporter: Claus Ibsen
The editing help of the TUI Source tab (quick doc, autocomplete, validation) is
for the YAML DSL only. XML files are only checked to be well formed, and Java
files only get the diagnostics of javac, which cannot see inside strings where
most Camel mistakes are (endpoint URIs and their options, simple expressions,
to vs toD).
The YAML help is built from YAML-shaped line patterns. Instead of repeating
that per DSL, add one model-based layer in camel-jbang-core: parse the source
into route definitions with line numbers (LwJavaParser for Java, ModelParser
for XML), find the node on a line, and run Camel checks on the model and ask
the catalog about the node.
The API is shaped like the operations of a language server (diagnostics, hover,
completion with line and column) without the protocol, so the TUI, the MCP
tools (camel_validate_source) and the camel validate CLI call it in-process,
and other tools could use it later.
First part (this ticket):
* Camel validation of Java and XML routes: endpoint URIs (unknown options,
invalid values, missing required path) including the endpoint DSL, simple
expression syntax, to with an expression that needs toD, direct/seda endpoints
no route consumes, and what the parser could not read reported as information.
* Quick doc for Java and XML routes in the TUI Source tab (EIP, endpoint and
language docs by line).
* Autocomplete inside the strings of Java routes where it is simple (component
names, endpoint options, simple functions), working on half-edited files.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)