Fix expression editor completion for multi-value properties#658
Fix expression editor completion for multi-value properties#658pasindufernando1 wants to merge 2 commits intoballerina-platform:1.5.xfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes expression editor completion for multi-value properties, specifically addressing the issue where properties with arrays of values (like rest parameters) were not being properly converted to a string representation for the expression editor.
Changes:
- Added logic to handle JSON array values in property initialization by converting them to comma-separated strings
- Added new test resources (proj2 Ballerina project) with HTTP service and record types
- Added test configuration (proj24.json) for validating multi-value completion behavior
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ExpressionEditorContext.java | Enhanced property initialization to detect and convert JSON array values to comma-separated strings for multi-value properties |
| proj2/types.bal | New test file defining record types used in the completion test scenario |
| proj2/main.bal | New test file with HTTP service containing io:println with multiple parameters to test multi-value completion |
| proj2/Ballerina.toml | New test project configuration file |
| proj24.json | New test configuration defining the expected completions for multi-value property scenario |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...main/java/io/ballerina/flowmodelgenerator/core/expressioneditor/ExpressionEditorContext.java
Show resolved
Hide resolved
nipunayf
left a comment
There was a problem hiding this comment.
As mentioned in wso2/product-ballerina-integrator#2310 (comment), we will only accept strings for the value field. Therefore, this change will become redundant once the above-mentioned change is implemented.
|
A complete solution for int inconsistencies in handling lists and maps will be introduced with a model change as mentioned in wso2/product-ballerina-integrator#2310 (comment). Hence closing the PR |
Purpose
Fixes : wso2/product-ballerina-integrator#2307