redhat-developer / redhat-developer/vscode-java

Code Completion stops when code files are reopened

Open
#3,485 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Whenever I open a folder and start to write some java code in it, then it works fine I get autocomplete and everything, but If I close VSCode and open that folder again then everything stops only some basic features work like syntax highlighting etc. even the auto imports feature does not even works until I have cleaned the Java Language server workspace.

Environment
  • Operating System: Windows 10 Version 22H2 Build 19045.3930
  • JDK version: java 21 2023-09-19
  • Visual Studio Code version: Version: 1.86.0 (system setup) Commit: 05047486b6df5eb8d44b2ecd70ea3bdf775fd937
  • Java extension version: v1.27.0
Steps To Reproduce
  1. Open VSCode in an empty folder
  2. Create a java source file with some basic code in it (Like a hello world or read a number through terminal with scanner).
  3. Close VSCode.
  4. Open VSCode in the same folder again.
  5. Create a new java source file with some basic code.
  6. Now code completion will stop working.
Issue Replication Video

https://github.com/redhat-developer/vscode-java/assets/66440500/1c606780-d05e-49e7-8c15-04ac20999d94

Please attach logs
.log
client.log

Current Result

Screenshot (7)

Expected Result

Screenshot (8)

Additional Informations

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 reported sequence on Windows 10 with the listed VS Code, JDK, and Java extension versions, then inspect the attached default.log and client.log. Focus first on Java language server workspace initialization after reopening the folder; done means code completion and auto-imports work again without manually cleaning the workspace.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, 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.