Skip to content

Completion items in wrong order for overloaded methods #3206

Closed
eclipse-jdtls/eclipse.jdt.ls
#2874

Description

@charles-wangkai

In recent versions (from v1.17.0 to v1.20.0), the completion popup list shows overloaded methods from those with more complex parameters to those with fewer parameters from top to bottom. But what I want most times is the fewer parameters version, which leads to more "arrow down" key typing to select the expected item. It is annoying to impact coding productivity.

This seems a regression issue, since in early versions (up to v1.16.0) the order was reversed so that the fewer parameters version generally ranked higher and was placed at the top.

Environment
  • Operating System: All
  • JDK version: 17
  • Visual Studio Code version: 1.80.1
  • Java extension version: The issue first arose in recent versions (from v1.17.0 to v1.20.0), it was fine in early versions (up to v1.16.0)
Current Result

For example, the completion items show the three versions of Collectors.joining(...) in from complex to simple order, in the latest version v1.20.0:

Screenshot 2023-07-18 at 08 30 01
Expected Result

While the same three methods were displayed in from simple to complex order, in early versions (up to v1.16.0):

Screenshot 2023-07-18 at 08 31 47

Activity

  1. rgrunber commented on Sep 6, 2023

    @rgrunber
    Member

    I suspect this has a similar cause to eclipse-jdtls/eclipse.jdt.ls#2705 . After we introduced label detail support (which did produce nicer completion items), we regressed in certain ways (sorting, filter text). Maybe @hopehadfield can have a look here.

  2. moved this to 📋 Backlog in IDE Cloudaptorson Sep 6, 2023
  3. self-assigned this
    on Sep 6, 2023
  4. moved this from 📋 Backlog to ✅ Done in IDE Cloudaptorson Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions