redhat-developer / redhat-developer/vscode-java
Format document doesn't work when document is not saved
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
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
- File >> New Text File
- 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.
- Right-click anywhere in the document and click Format document.
Current Result
Nothing happens.
Expected Result
The code gets formatted.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the report. Start by reproducing the formatting failure in a new, unsaved Java document on the stated VS Code setup, then trace the format-document entry point; done means the same Java code formats successfully before it is saved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100