redhat-developer / redhat-developer/vscode-java

Code completion does not insert parentheses and parameter suggestions

Open
#3,701 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Code completion fails to insert parantheses and parameter suggestions when invoked on a type for the first time.

Environment
  • Operating System: Ubuntu 22.04.4 LTS
  • JDK version: java-21-openjdk-amd64
  • Visual Studio Code version: 1.91.0
  • Java extension version: 1.32.0
Steps To Reproduce
  1. Open minimal Java Maven Project (Sample GitHub Repo)
  2. Open Java file App.java
  3. (Make sure that Language Server workspace is cleaned)
  4. In line 19, enter set. and wait for completion list to appear
  5. Enter clo to filter completion list entries
  6. Hit <Enter> to select entry clone() from completion list
Current Result

set.clo gets expanded to set.clone

Expected Result

set.clo gets expanded to set.clone()

Additional Informations
  • When completion item is focussed, completion item details (JavaDoc) cannot be displayed.
  • Language client logs report an error every time the cursor keys are used to navigate the completion list (client.log)
  • When completion item is selected (hitting <Enter>), language server reports an error (server.log)
  • When triggering the completion list a second time, completion works as expected
  • Reproduction can be repeated after cleaning Java Language Server workspace
  • When reproducing the issue, I only had these extensions enabled:
    Selection_180

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the minimal Java Maven project by opening App.java, cleaning the Language Server workspace, and selecting clone() after filtering the completion list. Read the linked client.log and server.log alongside the first completion invocation. Done means the first invocation inserts clone(), shows completion details, and no longer reports the described navigation or selection errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.