redhat-developer / redhat-developer/vscode-java

[Bug] Autocompletion/Importing not working in 3 scenarios

Open
#3,585 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There are 3 scenarions where autocompletion/importing does not work.

  1. @NamedQueries({ @NamedQuery(name = InnerClass, query = "SELECT t FROM Test t WHERE t.id = :id") })
    The InnerClass is recognized, but can not be imported into java class. The ineer class is defined within same class where annotation is present.
  2. @NamedQueries({ @NamedQuery(name = "test", query = "SELECT t FROM Test t WHERE t.id = :id"), @NamedQuery(name = "testOne", query = "SELECT t FROM Test t WHERE t.id = :id") })
    @NamedQueries can not be autocompleted and imported. The only way it is working is when there is only one item in array.
  3. `public @interface Test {
    Class<?>[] groups() default {};

List
}`
The List can not be autocompleted, the only way it is working is when Class<?>[] groups() default {}; is commented.

Also, all scenarios are within project attached and well documented. Please take a look.
vs-code-test.zip

Environment
  • Operating System: Arch Linux
  • JDK version: 21
  • Visual Studio Code version: 1.88
  • Java extension version: 1.29

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

Start by opening the attached vs-code-test.zip and reproducing the three annotation and completion cases in the Java extension under the listed environment. Trace the completion and import behavior for each snippet; done means InnerClass, multiple @NamedQuery entries, and List all autocomplete and import successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
developer-experience, devtools
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.