Remove Redundant Type Hierarchy
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 66/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, vscode
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start in package.json and find the command IDs and menu contributions for the custom type hierarchy, then grep those IDs across the extension. Read typeHierarchyTree.ts and references-view.d.ts to see what can be deleted, and check the command implementations registered elsewhere. Done means the duplicate "Show Type Hierarchy" entry is gone, the custom commands and UI code are removed, and the extension builds and tests pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Currently, when you right click a class name, there are two context menu entries called "Show Type Hierarchy".
One is contributed by us (vscode-java) and one is a default one provided by VS Code.
We should remove the entry provided by us, along with all the associated UI code, since the default type hierarchy UI provided by VS Code is sufficient, and removing code with reduce the complexity of this project. VS Code provides this UI automatically, since jdtls advertises it supports type hierarchy. The other entry exists because we implemented type hierarchy support before it was added into the LSP specification.
There is one minor difference between our custom type hierarchy UI and the default UI: we provide a "Class Hierarchy" view that shows both super classes and sub classes at the same time. However, after talking this through with Rob, I don't think it's worth saving this UI, since then there would be two different ways to access the same information, which would be confusing to end users.
Here's a list of things we'll need to remove: (hopefully complete but there might be other things as well):
- The UI itself, i.e.
typeHierarchyTree.ts - The typings we have for interacting with VS Code's references view API (
references-view.d.ts) - The commands to open the type hierarchy view (these are registered in package.json and implemented throughout the codebase; grepping for the id listed in the package.json should find the implementations)
- The registration of various commands (also in the package.json)
- There's separate "Subtype hierarchy" and "Supertype hierarchy" commands that are referenced in code, but only appear in the command palette and currently don't seem to function. These should be removed
See https://github.com/redhat-developer/vscode-java/pull/2376 for some more context
To Reproduce
Steps to reproduce the behaviour:
- Make a type that inherits from a few other types:
public class B extends A implements Serializable {
}
- Right click on the type name (in this case
B). - There are two "Show Type Hierarchy"
Expected behaviour
There should instead be one "Show Type Hierarchy" entry
Environment
- Operating System: Linux (but it's not Linux specific)
- JDK version: 25
- Visual Studio Code version: 1.143.1
- Java extension version: 1.59.0
Additional Information
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 549
- Merge trung bình
- 4 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 20
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc 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.
Issue khác của redhat-developer/vscode-java
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
redhat-developer/vscode-java#4564 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
redhat-developer/vscode-java#4550 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
redhat-developer/vscode-java#4537 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug need info
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
redhat-developer/vscode-java#4520 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
redhat-developer/vscode-java#4517 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của redhat-developer/vscode-java
Issue tương tự
-
area:cli bug P4
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug from-studio
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
esengine/DeepSeek-Reasonix#14868 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
loopbackio/loopback-next#11878 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug 🐛
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
comunica/comunica#1925 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày