redhat-developer / redhat-developer/vscode-java
Provide a way to let Formatter profile settings take precedence over VS Code's
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ả
I have a configured formatter profile which has, among others, the following property:
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
If I go to a file and change, using the the option on the bottom right of VSCode to use a different attribute (ex.: space: 8) to code automatically formats to that selection, ignoring the formatted profile.
The problem is that after doing that, the formatter option for tabulations stop working. There should be a way to force format according the formatter profile, or to remove these individual file formatter options. Right now, I have some files where I pressed this and I don't know which ones, and can't force them to be formatted properly
Environment
- Operating System: Windows 10 Pro
- JDK version: 1.8.0_172
- Visual Studio Code version: 1.28.0
- Java extension version: 0.32
Steps To Reproduce
- Create and apply a formatter profile with tabulation char TAB and size: 4
- Open .java file and format it. It applies this profile format
- Using VSCode bottom right menu, change tabulation char and size. Ex.: SPACE and size: 8. The file applies this profile format.
- Now you can't change this specific file to apply the profile configured tabulation char and size.
Current Result
The project applies to manually selected configuration. Can't revert to use profile format.
Expected
One of the following:
- Allow to format all project according to profile formatter
- Force format a single file to apply profile formatter
- Ignore profile formatter for a list of files (but this needs to be visible/editable on 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
Bắt đầu bằng cách tái hiện các thay đổi về formatter-profile và định dạng ở góc dưới bên phải của VS Code trên một tệp .java trong tiện ích mở rộng Java. Theo dõi cách tùy chọn định dạng được chọn theo từng tệp ghi đè lên profile; hoàn tất nghĩa là người dùng có thể khôi phục hoặc buộc sử dụng định dạng của profile cho một tệp hoặc toàn bộ dự án, với các ghi đè đang hoạt động có thể nhìn thấy hoặc chỉnh sửa được.
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, typescript, vscode
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Tính năng
- Độ 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
- 35/100