davsclaus opened a new pull request, #27239: URL: https://github.com/apache/camel/pull/27239
Fixes [CAMEL-25242](https://issues.apache.org/jira/browse/CAMEL-25242), a follow-up of CAMEL-25219 (#27232): Tab completed the simple functions, header names and operators, but nothing inside a function's arguments. | Cursor | Tab lists | |---|---| | `${date:` / `${date-with-timezone(` | the commands: `now`, `millis`, `exchangeCreated`, `header.`, `variable.`, `exchangeProperty.`, `file` (an offset like `-24h` may follow) | | `${date:now:` | common `SimpleDateFormat` patterns (`yyyy-MM-dd`, `yyyy-MM-dd'T'HH:mm:ss`...) | | `${date-with-timezone(now:` | the JVM's time zones, UTC first; a chosen zone opens the patterns | | `${bean:` | the beans the **project declares** (`@BindToRegistry`, `@Named`, `@Component`, `@Bean`, YAML/XML beans: the scan the bean jump links already use), with where each is declared | | `${properties:` / `${propertiesExist:` | the keys of the project's `.properties` files, with their values | Choosing `date:command` or `bean:name.method` in the function list opens these right away. Replacing an argument keeps what follows it: `${bean:|orderService.total}` → `${bean:priceCalculator.total}` (found while taking the screenshot).  ### Changes - `SimpleCompletionContext`: argument kinds (`DATE_COMMAND`, `DATE_PATTERN`, `TIME_ZONE`, `BEAN`, `PROPERTY_KEY`), matched before the general function pattern, each with what closes it. - `SimpleCompletions`: the items; a `Project` record carries the beans and property keys (`Project.NONE` keeps the old overload). - `SourceTab` / `SourceEditAssist` / `ProjectBeans.beans()`: the project's beans and property keys. - `SourceViewer`: reopens only the simple completion after a stem (no other popup when a function has nothing to offer); the word replaced stops where the argument does. - Help, doc page and a screenshot. ### Testing - `SimpleCompletionTest`: the argument contexts, their values, the project's beans and keys, `${dat` → `date:` → `now` → `:` → `yyyy-MM-dd` end to end, replacing a bean keeping its method. - The `camel-jbang-plugin-tui` suite passes (1574 tests). - Tried live in the TUI; the screenshot is from that run. _Claude Code on behalf of davsclaus_ 🤖 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]
