You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When triggering autocomplete on methods that have many overloads, VSCode lists the longest ones first. It is usually the shortest ones that I (and, I suspect, most developers) need. I’d like to see it first.
Example: Preconditions#checkArgument has 25 overloads. I usually need the simple checkArgument(boolean), and occasionally checkArgument(boolean expression, Object errorMessage), but VSCode lists checkArgument(boolean expression, String errorMessageTemplate, Object p1, Object p2, Object p3, Object p4) first, and the two ones that are most needed as 24th and 25th suggestions.
Same with the 93 overloads of Assertions#assertEquals: one usually needs the simple two arguments version, but VSCode suggests all variants of the four arguments overloads first.
Note that the Javadoc displays the overloads shortest first, which seems quite natural to me. Note also that selecting a shorter method then adding arguments is less tedious than selecting a longest one then deleting arguments.
Is this how VSCode normally behaves, or have I misconfigured something? If it is its usual behavior, can it be changed?
Environment
Operating System: Linux
JDK version: 17
Visual Studio Code version: 1.82.2
Java extension version: 1.23.0
Steps To Reproduce
In a project with Guava added as a dependency, type Preconditions.checkAr
Trigger autocompletion
The text was updated successfully, but these errors were encountered:
I think we fixed this in the language server in eclipse-jdtls/eclipse.jdt.ls#2874 so it should be in the pre-releases, and make the next release of vscode-java (end of October). We now sort by number of parameters. It should also be possible to filter by the signature data also.
This was a regression from the time we introduced labelDetails. It made the completion list nicer, but affected ordering/filtering. We're currently going through some of these issues and addressing them.
When triggering autocomplete on methods that have many overloads, VSCode lists the longest ones first. It is usually the shortest ones that I (and, I suspect, most developers) need. I’d like to see it first.
Example: Preconditions#checkArgument has 25 overloads. I usually need the simple
checkArgument(boolean)
, and occasionallycheckArgument(boolean expression, Object errorMessage)
, but VSCode listscheckArgument(boolean expression, String errorMessageTemplate, Object p1, Object p2, Object p3, Object p4)
first, and the two ones that are most needed as 24th and 25th suggestions.Same with the 93 overloads of Assertions#assertEquals: one usually needs the simple two arguments version, but VSCode suggests all variants of the four arguments overloads first.
Note that the Javadoc displays the overloads shortest first, which seems quite natural to me. Note also that selecting a shorter method then adding arguments is less tedious than selecting a longest one then deleting arguments.
Is this how VSCode normally behaves, or have I misconfigured something? If it is its usual behavior, can it be changed?
Environment
Steps To Reproduce
Preconditions.checkAr
The text was updated successfully, but these errors were encountered: