redhat-developer / redhat-developer/vscode-java
Java Formatter settings are not used
Chưa có ai nhận issue này.
- 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ả
If I open the flow-server project from https://github.com/vaadin/flow/tree/main/flow-server
and have Eclipse formatter settings set to use https://raw.githubusercontent.com/vaadin/flow/main/eclipse/VaadinJavaConventions.xml which defines <setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>

then when I open e.g. the HandlerHelperTest.java file, VS Code shows "Spaces: 8" in the bottom bar and formatting the file changes it to use indentation of 8 spaces instead of 4
The settings file should be fine because when I go back to command line and run mvn formatter:format in the project, the indentation is changed back to 4 spaces.
Environment
- Operating System: macOs Ventura
- JDK version: 17
- Visual Studio Code version: 1.76.2
- Java extension version: 1.16.0
Steps To Reproduce
- See above
Current Result
File is not formatted according to given settings
Expected Result
File is formatted according to given settings
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện vấn đề bằng cách mở flow-server với VaadinJavaConventions.xml được cấu hình trong VS Code, sau đó so sánh việc định dạng HandlerHelperTest.java với kết quả của mvn formatter:format. Theo dõi cách tiện ích mở rộng Java đọc và áp dụng các thiết lập của trình định dạng. Hoàn thành khi VS Code sử dụng nhất quán thụt lề bốn dấu cách đã cấu hình cùng với trình định dạng Maven.
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
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100