davsclaus opened a new pull request, #27133: URL: https://github.com/apache/camel/pull/27133
_Claude Code on behalf of davsclaus_ [CAMEL-25192](https://issues.apache.org/jira/browse/CAMEL-25192) and [CAMEL-25193](https://issues.apache.org/jira/browse/CAMEL-25193) ### TUI Source tab: jump links for Java DSL routes (CAMEL-25192) The Source tab links a `to`/`toD`/`wireTap` line to the route that consumes the endpoint, and a `from` line back to its callers. `g` opens a go-to-route popup. Until now this only worked for YAML routes. Java RouteBuilder sources now get the same links. They are read with the Java DSL parser of CAMEL-25148 (`LwJavaParser`), so nothing is compiled or run. - **Parser:** every step gets the line of the call that added it. `to(...)` returns the route, not the new step, so steps had no line before. Choice branches, switch cases and the switch fallback are covered too. - **`ProjectRoutes.parseJava`** reads a Java source with the endpoint DSL and the project's constants resolved, as the project overview does. - **`JavaRouteScanner`** (TUI) indexes the routes and the endpoints they send to, with their lines. Java routes link to and from YAML routes in the same folder. `direct("in")` from the endpoint DSL links like `"direct:in"`. - **Switch EIP:** the cases and `otherwise` link to the route of their `uri`, in Java and in YAML. `switch` is a linkable block, and a YAML case may start with `- uri:`. - **Route names:** a route without an id is named by its full `from` endpoint without options (`file:src/main/data`, not `src/main/data`). The go-to-route popup does not repeat it. - **Fix:** the go to route and go to line popups take typed digits instead of switching tabs. - **Fix:** the viewer footer shows `g go to route` and `Ctrl+G go to`. The hints were gone after a jump, as the jump moves the focus to the viewer. ### Project overview: Switch EIP destinations (CAMEL-25193) The overview (`camel overview`, the `camel_project_overview` MCP tool, the TUI Architecture and Topology views) did not see what a switch sends to. The uri of each case and of `otherwise` is now an endpoint the route sends to, in the Java, YAML and XML readers. Checked for reference: the route-topology dev console already shows switch destinations. The endpoint DSL overloads for `doCase`/`otherwise` and the route-structure console labels are noted on CAMEL-25178. ### Tests - camel-java-io: 169 tests (new: step lines, switch case lines) - camel-jbang-core: `ProjectOverviewTest.switchDestinationsInEveryDsl` plus the overview and catalog tests - camel-jbang-plugin-tui: 1434 tests (new: `JavaRouteScannerTest`, `SourceTabJumpLinksTest`, go-to popups in `SourceViewerEditTest`) - Tried in the TUI on a Spring Boot Java example: the `to` link, the reverse link and the go-to-route popup Not in this PR: XML routes still have no jump links. The Source tab only scans YAML for them, which is older than this change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
