redhat-developer / redhat-developer/vscode-java

Java Formatter is broken somehow in my workspace

Đang mở
#2,717 7 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

formatter
Ngôn ngữ chính
TypeScript
Star
2.3k
Fork
546
Merge trung bình
20 giờ 1 phút
Pull request đã merge (30 ngày)
11

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Issue không nêu tên tệp nguồn, bài kiểm thử hoặc điểm vào nào. Hãy bắt đầu bằng cách tái hiện lỗi trong workspace bị ảnh hưởng, so sánh với dự án đang hoạt động và kiểm tra cấu hình Java formatter cùng môi trường extension; hoàn tất có nghĩa là các tệp Java được format thành công trong workspace bị ảnh hưởng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
java, vscode
Lĩnh vực
developer-experience, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.