redhat-developer / redhat-developer/vscode-java

Java Formatter is broken somehow in my workspace

Open
#2,717 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

So I played around trying to use a custom formatter for Java. At some point my workspace broke and now I cannot format any Java code.
I tried to remove every setting related to formatting. I used "clean the Java language server workspace"
I deleted workspace caches in %userprofile%\AppData\Roaming\Code

Nothing works. Now I get the window "There is no formatter for Java installed" whenever I try to format some Java file.

I tried to set up a formater again. I added the file, used these settings:
"java.format.settings.url": ".vscode/GoogleStyle.xml",
And now I can run "Open Java Formatter Setting Wth Preview ", but I still cannot format my code.

Also I created another small project with one Java file and there the formatter works.

Environment
  • Operating System: Windows 11
  • JDK version: 11 and 17
  • Visual Studio Code version: 1.71.2
  • Java extension version: 1.11.0

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

The issue names no source files, tests, or entry points. Start by reproducing the failure in the affected workspace, compare it with the working project, and inspect the Java formatter configuration and extension environment; done means Java files format successfully in the affected workspace.

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
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.