Make Ctrl+T more context-dependent
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java, typescript, vscode
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Payload không nêu tệp nguồn hoặc bài kiểm thử nào; hãy bắt đầu bằng cách tái hiện Ctrl+T trên các phương thức Java được tô sáng trong VS Code và so sánh hành vi hiện có với Eclipse. Được xem là hoàn tất khi cây đi theo các triển khai phương thức liên quan của lớp cha và lớp con đã khai báo, đồng thời việc chọn một nút sẽ điều hướng đến triển khai phương thức đó thay vì phần khai báo kiểu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Suggestion
When pressing Ctrl+T when highlighting a method, we see the method hierarchy instead of the type hierarchy and navigation leads us directly to the method's declaration within the selected type and not to the declaration of the type itself.
Use Cases
I want to be able to easily navigate to all implementations of subclasses as well as super classes of a certain method to better understand how a certain type affects implementation of the selected method.
Examples
Given the following class hierarchy:
class A {
public String generateGreeting() {
return "Hi!";
}
}
class B extends A {
@Override
public String generateGreeting() {
return "Hello!";
}
}
class C extends A {
@Override
public String generateGreeting() {
return "Guten Tag!";
}
}
When highlighting generateGreeting() and pressing Ctrl+T I want to see a tree where nodes represent classes implementing the highlighted method. The nodes' nesting represents the class hierarchy. The nodes shown depend on the declared type of the field/variable on the caller side. In case the method is highlighted at its declaration the declared type would be the class enclosing the method. All sub classes and super classes of the declared type implementing the method must be shown as nodes in the tree (not only sub classes). When clicking a node, VS Code navigates to the corresponding method implementation of the highlighted method, not to the beginning of the type declaration (current behavior):
Situation 1:
A a = new B();
a.generateGreeting();
Declared type would be A, so I want to see implementations of A.generateGreeting and B.generateGreeting and C.generateGreeting as nodes in the tree
Situation 2:
B b = new B();
b.generateGreeting();
Declared type would be B, so I want to see implementations of A.generateGreeting and B.generateGreeting as nodes in the tree, but not C.generateGreeting because it is neither a subclass nor a super class of B.
You could check Eclipse's behavior for an existing implementation.
- Ngôn ngữ chính
- TypeScript
- Star
- 352
- Fork
- 166
- Merge trung bình
- 17 giờ 47 phút
- Pull request đã merge (30 ngày)
- 32
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 microsoft/vscode-java-pack
-
Memory Leak in Linux Đang mởai-triaged bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
microsoft/vscode-java-pack#1543 · 8 bình luận · 4 reaction ·
-
ai-triaged bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
microsoft/vscode-java-pack#1443 · 1 bình luận · 2 reaction ·
-
ai-triaged bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
microsoft/vscode-java-pack#1425 · 1 bình luận ·
-
ai-triaged enhancement feature-request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
microsoft/vscode-java-pack#1423 · 2 bình luận · 1 reaction ·
-
ai-triaged area/jdtls bug needs-investigation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
microsoft/vscode-java-pack#1420 · 1 bình luận ·
Tất cả issue của microsoft/vscode-java-pack
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100