davsclaus opened a new pull request, #27200:
URL: https://github.com/apache/camel/pull/27200
_Claude Code on behalf of davsclaus_
Three source editor improvements: the editor now tells you more about a line
from the rest of the project.
### 1. Problems are marked as soon as a file opens
Before, the problems of a route showed only in the editor, and only after
the first change. Now a Camel file (YAML, Java, XML routes and properties) is
checked once when it loads:
- the view marks problem lines with a red `✗`;
- the title shows `errors: N`;
- the panel at the bottom shows the problem of the selected line;
- **F9** goes to the next problem.
The editor (F4) starts with the same problems, before the first change.
Process-sourced views (a running integration's route dump) are not checked.
### 2. Placeholder values and bean jumps in the quick doc
The quick doc of a line now starts with what the project knows about it:
- **Placeholders:**
- `{{refund.period}} = 2000 (application.properties)`;
- for a key that is not set, the default it falls back to
(`{{key:default}}`) or that it is not in the project's `.properties` files;
- `{{env:X}}` and `{{sys:X}}` are said to come from the environment / JVM.
- **Beans:** `orderService (OrderService) is declared in OrderService.java:3
— Enter goes there`.
- A line that refers to a bean shows a `↵ name` jump link, and **Enter**
goes to its declaration, as for the jump links between routes.
- Bean references: `bean:name`, `.bean(MyBean.class)`, `.bean("name")`,
`.process(new X())`, `ref:` / `beanType:` in YAML and XML, `#class:` / `#type:`.
- Declarations: `@BindToRegistry`, `@Named`, `@Component`, `@Service`,
`@Bean` (also fully qualified), and the beans of YAML and XML files, read by a
new `ProjectBeans` index. The index looks at the project files at most every 2
seconds, as the quick doc asks on every frame.
### 3. Usages of an endpoint
**u** on a line with an endpoint lists its usages across the project: the
routes that consume from it and the steps that send to it, in YAML, Java and
XML. **Enter** goes there. It reuses the Go to Route popup, which now takes a
list and a title (`Usages of seda:shipping (3)`). Before, a `from` showed only
one of its callers as a reverse jump link.
### Tested
Live in the TUI, on a project with a Java route, two YAML routes and a bean
class:
- a YAML file with an option typo shows `errors: 1` and the `✗` as it opens;
- the placeholder and bean docs show;
- Enter on `bean:orderService` opens `OrderService.java` at
`@BindToRegistry`;
- `u` on `seda:shipping` lists its consumer and both producers, and opens
the Java one at its line.
New test: `SourceEditorProjectInfoTest` (markers on open and F9,
placeholders, bean references, bean jump links, usages). The full
camel-jbang-plugin-tui module (1463) passes. F1 help and the doc page are
updated. The Source Editor page in #27196 will get these too once both are in.
🤖 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]