Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the sorting order of completion items in from clause context #34264

Merged
merged 4 commits into from
Dec 13, 2021

Conversation

TharushiJay
Copy link
Contributor

Purpose

This PR improves the sorting order of completion items in from clause context giving priority to,

  1. Iterables
  2. Function call expressions
  3. Default sorting to the rest of the completion items

Fixes #33861

Samples

Screenshot 2021-12-09 at 18 53 56

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@codecov
Copy link

codecov bot commented Dec 10, 2021

Codecov Report

Merging #34264 (2711d30) into master (99b3ae9) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #34264   +/-   ##
=========================================
  Coverage     74.09%   74.09%           
- Complexity    45942    45950    +8     
=========================================
  Files          3165     3165           
  Lines        179122   179144   +22     
  Branches      23080    23083    +3     
=========================================
+ Hits         132714   132738   +24     
  Misses        38603    38603           
+ Partials       7805     7803    -2     
Impacted Files Coverage Δ
...tions/providers/context/FromClauseNodeContext.java 89.23% <100.00%> (+5.50%) ⬆️
.../ballerina/runtime/internal/scheduling/Strand.java 80.92% <0.00%> (-1.55%) ⬇️
...llerina/runtime/internal/scheduling/Scheduler.java 73.02% <0.00%> (-1.44%) ⬇️
...runtime/internal/scheduling/WorkerDataChannel.java 87.89% <0.00%> (-1.28%) ⬇️
...alang/langserver/diagnostic/DiagnosticsHelper.java 73.46% <0.00%> (-1.03%) ⬇️
...ballerinalang/central/client/CentralAPIClient.java 47.89% <0.00%> (+0.42%) ⬆️
...llerinalang/compiler/util/ImmutableTypeCloner.java 90.59% <0.00%> (+0.53%) ⬆️
...internal/repositories/RemotePackageRepository.java 71.50% <0.00%> (+1.55%) ⬆️
...s/src/main/java/io/ballerina/utils/ParserUtil.java 24.32% <0.00%> (+2.70%) ⬆️
...java/io/ballerina/runtime/internal/BLockStore.java 85.71% <0.00%> (+14.28%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99b3ae9...2711d30. Read the comment docs.

@TharushiJay TharushiJay added the Team/LanguageServer Language Server Implementation related issues. #Compiler label Dec 13, 2021
Copy link
Contributor

@nadeeshaan nadeeshaan left a comment

Choose a reason for hiding this comment

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

LGTM

@nadeeshaan nadeeshaan merged commit 9cde357 into ballerina-platform:master Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/LanguageServer Language Server Implementation related issues. #Compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Completion item sorting order in from caluse context is not accurate
2 participants