Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Code completion proposals are not properly sorted #46

Closed
fbricon opened this issue Nov 16, 2017 · 4 comments
Closed

Code completion proposals are not properly sorted #46

fbricon opened this issue Nov 16, 2017 · 4 comments

Comments

@fbricon
Copy link
Contributor

fbricon commented Nov 16, 2017

When typing String, the completion proposals are pretty much irrelevant:
screen shot 2017-11-16 at 9 38 59 am

Atom actually seems to ignore the sortText value of each proposal, which is supposed to translate the completion relevance into a proper sort:

        {
            "label": "String - java.lang",
            "kind": 7,
            "sortText": "999999164",
            "filterText": "String",
            "insertText": "String",
            "data": {
                "decl_signature": "Ljava.lang.String;",
                "pid": "74",
                "rid": "1",
                "uri": "file:/USERS/fbricon/Downloads/VSCode/src/Main.java"
            }
        },

For comparison, this is how VSCode displays the same results:
screen shot 2017-11-16 at 10 23 47 am

@fbricon
Copy link
Contributor Author

fbricon commented Nov 17, 2017

most likely related to atom/atom-languageclient#133

@damieng
Copy link
Contributor

damieng commented Nov 21, 2017

Sorting was added to atom-languageclient in atom/atom-languageclient@afef39b should go out with the next ide-java release.

@damieng
Copy link
Contributor

damieng commented Nov 29, 2017

Fixed in ide-java 0.7.0

image

@damieng damieng closed this as completed Nov 29, 2017
@fbricon
Copy link
Contributor Author

fbricon commented Nov 29, 2017

Nice! Now you just need to handle multiple textedits (from completionItem/resolve) to get proper autocompletion, including auto-imports (#17)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants