redhat-developer / redhat-developer/vscode-java

There is no formatter for 'java' files installed

Open
#1,736 3 comments 5 reactions 1 assignee View on GitHub

@testforstephen is already working on this.

Since Dec 18, 2020.

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

Description

Hello,

I try to format my java code with visual code.
I have try without configuration (for a default format) > and I have the message : There is no formatter for 'java' files installed
I have tried to follow https://github.com/redhat-developer/vscode-java/wiki/Formatter-settings >> then idem

Environment
  • Windows 10
  • JDK 12
  • 1.51.1
  • Java extension version: v0.12.0
Steps To Reproduce
  1. Install visual code
  2. Init java project (with gradle) then create a new class
  3. CTRL + P > format document > There is no formatter for 'java' files installed

As said on https://github.com/redhat-developer/vscode-java/issues/1497
I have tried added "[java]": {"editor.defaultFormatter": "redhat.java"} on settings.json

(Precision : My starting java server is starting and loop at 62% Starting java language server - build parameterized mode .... gradle.eclipse .....)
(will work when I desactivate Gradle importing project (aka "java.import.gradle.enabled": false )

https://github.com/redhat-developer/vscode-java/issues/158

Setting.json

{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"files.exclude": {
"/.classpath": true,
"
/.project": true,
"/.settings": true,
"
/.factorypath": true
},
"[java]": {"editor.defaultFormatter": "redhat.java"},
"java.configuration.runtimes": [
{
"name": "JavaSE-1.8",
"path": "C:\Program Files\Java\jdk1.8.0_261"
}
],
"java.home": "C:\Program Files\Java\jdk-12.0.2",
"java.help.firstView": "gettingStarted",
"java.project.importOnFirstTimeStartup": "automatic",
"explorer.compactFolders": false,
"workbench.enableExperiments": false
}

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.