redhat-developer / redhat-developer/vscode-java
Organize imports enhancement
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ả
Currently "Organize imports" will do three things:
- Add missing imports
- Remove all unused imports
- Sort existing imports
And there are serveral requests about feature "Organize imports":
Organize import without sorting:
- https://github.com/redhat-developer/vscode-java/issues/1575#issue-677597353
- https://github.com/redhat-developer/vscode-java/issues/1575#issuecomment-879667855
Organize imports (and other code actions) in multiple files:
- https://github.com/redhat-developer/vscode-java/issues/1107
- https://github.com/redhat-developer/vscode-java/issues/2282
- https://github.com/microsoft/vscode-java-pack/issues/1085
We can find rooms to improve. Although we have configuration java.completion.importOrder, it's not such visible and it's hard to "hardcode" a package list for some users. In this way, we can have serveral points to improve:
- Add "Remove all unused imports" quickfix for related warnings https://github.com/eclipse/eclipse.jdt.ls/pull/2280
- it just remove all unused imports, will not affect existing valid imports
- Add "Add all missing imports" quickfix for related errors https://github.com/eclipse/eclipse.jdt.ls/pull/2292
- it just add all missing imports, will not affect(sort) existing valid imports
- Support "Add all missing import" when pasting https://github.com/redhat-developer/vscode-java/pull/2795
- related API: https://github.com/microsoft/vscode/issues/30066
- Support code actions (and formatting maybe) in folder level
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
Không có tệp hoặc bài kiểm thử nào được nêu tên. Hãy bắt đầu bằng việc xem xét các issue và pull request được liên kết, sau đó lần theo luồng Organize imports hiện có và các code actions cho một tệp; công việc được xem là hoàn thành khi hỗ trợ code actions ở cấp thư mục mà không làm suy giảm hành vi thêm, xóa và sắp xếp hiện 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