vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Format document doesn't work when document is not saved

Open geoff-m opened this issue 7 months ago • 1 comments

Formatting the document does not work when the document is not saved to disk.

Environment
  • Operating System: Windows 11
  • JDK version: 11
  • Visual Studio Code version: 1.91.1
  • Java extension version: v1.32.0
Steps To Reproduce
  1. File >> New Text File
  2. Put some Java code in the new document that would be changed by formatting. If the language mode is not automatically detected as Java, set it manually.
  3. Right-click anywhere in the document and click Format document.
Current Result

Nothing happens.

Expected Result

The code gets formatted.

geoff-m avatar Jul 20 '24 10:07 geoff-m