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

Revamp Language Server Completions Engine #20748

Merged

Conversation

nadeeshaan
Copy link
Contributor

Purpose

With this, revamp the language server completion engine

  • Introduce a wrapper for the completions to benefit completion item sorting

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-io
Copy link

codecov-io commented Jan 27, 2020

Codecov Report

Merging #20748 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #20748   +/-   ##
=======================================
  Coverage   14.59%   14.59%           
=======================================
  Files          51       51           
  Lines        1398     1398           
  Branches      214      214           
=======================================
  Hits          204      204           
  Misses       1178     1178           
  Partials       16       16

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 1a402a3...d8c7efd. Read the comment docs.

@@ -126,6 +126,10 @@ public String getLabel() {
return label;
}

public SnippetType getSnippetType() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a java doc here

Copy link
Contributor

@rasika rasika left a comment

Choose a reason for hiding this comment

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

Reviewed

int sortText = Integer.parseInt(completionItem.getSortText());
completionItem.setSortText(Integer.toString(sortText - 1));
public List<CompletionItem> sortItems(LSContext ctx, List<LSCompletionItem> completionItems) {
return new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please revisit returning an empty list here

@nadeeshaan nadeeshaan merged commit ba5cefb into ballerina-platform:master Jan 31, 2020
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.

3 participants