Skip to content

Comments

Provide completions for expressions within the data mapper#434

Merged
nipunayf merged 4 commits intoballerina-platform:1.2.xfrom
nipunayf:data-mapper-expression-completions
Oct 25, 2025
Merged

Provide completions for expressions within the data mapper#434
nipunayf merged 4 commits intoballerina-platform:1.2.xfrom
nipunayf:data-mapper-expression-completions

Conversation

@nipunayf
Copy link
Contributor

Purpose

The PR extends the current implementation of the compiler API to handle special expressions in the data mapper by generating wrapper functions with the required variables for completions. Note that this is a temporary solution until a proper API extension is implemented.

Fixes wso2/product-ballerina-integrator#1287

Copilot AI review requested due to automatic review settings October 25, 2025 16:18
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 extends the compiler API implementation to provide code completions for expressions within the data mapper by generating temporary wrapper functions with required variables. This is a workaround solution until a proper API extension is available.

Key Changes:

  • Added a new DATA_MAPPING_EXPRESSION value type to handle data mapper expressions
  • Implemented temporary function wrapper generation to enable completions for data mapper contexts
  • Added comprehensive test coverage with multiple completion scenarios

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Property.java Adds DATA_MAPPING_EXPRESSION enum value
CompletionRequest.java Implements special handling for data mapper expressions by generating wrapper functions
ExpressionEditorContext.java Adds generateFunctionDefinition() method to create temporary function wrappers
data_mapper.bal Removes trailing whitespace
proj17-23.json New test files covering various completion scenarios in data mapper context

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nipunayf nipunayf force-pushed the data-mapper-expression-completions branch from 3fab1ba to db2fd23 Compare October 25, 2025 16:43
Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe left a comment

Choose a reason for hiding this comment

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

LGTM

@nipunayf nipunayf merged commit d583eef into ballerina-platform:1.2.x Oct 25, 2025
3 checks passed
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