Skip to content

Comments

Fix expression editor completion for multi-value properties#658

Closed
pasindufernando1 wants to merge 2 commits intoballerina-platform:1.5.xfrom
pasindufernando1:2307Fix
Closed

Fix expression editor completion for multi-value properties#658
pasindufernando1 wants to merge 2 commits intoballerina-platform:1.5.xfrom
pasindufernando1:2307Fix

Conversation

@pasindufernando1
Copy link
Contributor

Copilot AI review requested due to automatic review settings January 26, 2026 10:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@nipunayf nipunayf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@pasindufernando1
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants