ballerina-lang
ballerina-lang copied to clipboard
Improve obj field mapping constructor completions
Purpose
$subject
Fixes #37625
Samples
Check List
- [x] Read the Contributing Guide
- [ ] Updated Change Log
- [ ] Checked Tooling Support (#<Issue Number>)
- [x] Added necessary tests
- [x] Unit Tests
- [ ] Spec Conformance Tests
- [ ] Integration Tests
- [ ] Ballerina By Example Tests
- [x] Increased Test Coverage
- [ ] Added necessary documentation
- [ ] API documentation
- [ ] Module documentation in Module.md files
- [ ] Ballerina By Examples
Codecov Report
Base: 72.13% // Head: 74.81% // Increases project coverage by +2.67% :tada:
Coverage data is based on head (
9111dbc) compared to base (ad9fa98). Patch coverage: 83.33% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## 2201.2.x #37742 +/- ##
==============================================
+ Coverage 72.13% 74.81% +2.67%
- Complexity 49085 50751 +1666
==============================================
Files 3353 3353
Lines 195144 195147 +3
Branches 25602 25602
==============================================
+ Hits 140772 145994 +5222
+ Misses 46418 40720 -5698
- Partials 7954 8433 +479
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ngserver/completions/util/ContextTypeResolver.java | 73.69% <75.00%> (+0.06%) |
:arrow_up: |
| ...ava/io/ballerina/compiler/api/impl/NodeFinder.java | 69.69% <100.00%> (+0.10%) |
:arrow_up: |
| ...rina/compiler/internal/parser/BallerinaParser.java | 88.42% <0.00%> (+0.05%) |
:arrow_up: |
| ...2/ballerinalang/compiler/desugar/QueryDesugar.java | 85.59% <0.00%> (+0.10%) |
:arrow_up: |
| ...ava/io/ballerina/runtime/internal/TypeChecker.java | 77.51% <0.00%> (+0.18%) |
:arrow_up: |
| .../compiler/bir/codegen/interop/JMethodResolver.java | 78.80% <0.00%> (+0.24%) |
:arrow_up: |
| .../main/java/io/ballerina/cli/task/RunTestsTask.java | 79.94% <0.00%> (+0.58%) |
:arrow_up: |
| .../ballerina/runtime/internal/util/RuntimeUtils.java | 45.16% <0.00%> (+1.07%) |
:arrow_up: |
| ...allerina/runtime/internal/types/BFunctionType.java | 77.01% <0.00%> (+1.14%) |
:arrow_up: |
| ...rc/main/java/io/ballerina/cli/cmd/TestCommand.java | 51.14% <0.00%> (+1.52%) |
:arrow_up: |
| ... and 206 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Shall we address the following cases as well.
- Suggest variable names(object field names) in mapping constructor
int moduleVar = 20; class MyClass { int x = 10; int y = 20; record {int y; int x;} rec = {x, <cursor>}; }Here we should get a completion item for
y(object fields) as we have done other variables.
- Provide object fields for the value expression
we should include
xandyin the completion item list
I have add these two scenarios.
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the stale label is removed or commented.
@LakshanWeerasinghe shall we send this PR to master and 2201.3.x; then, close this?
Closing this PR in favor of #38367 (2201.3.x) and #38370 (master).

