ballerina-platform / ballerina-dev-tools

Ballerina Developer Tooling
http://ballerina.io
Apache License 2.0
114 stars 42 forks source link

Provide completions for expressions in the expression editor #403

Closed nipunayf closed 1 week ago

nipunayf commented 3 weeks ago

Description

Since the expression editor lacks access to the source code, it cannot retrieve completions from the text document. To address this, a LS API, expressionEditor/completions, appends changes to a temporary project to obtain the necessary completions.

Remarks

Duplicating the project introduces significant complexity in terms of both performance and memory, as it duplicates memory usage and involves many I/O operations. Therefore, we should explore an approach where the expression editor retrieves completions from the original project. This would be feasible if the state in which the user uses the expression editor does not trigger the other APIs.

hasithaa commented 2 weeks ago

@sachiniSam Do we need more functionalities for the expression editor?