Javadoc overriding methods not inheriting @param descriptions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java, typescript
- Lĩnh vực
- developer-experience, tooling
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện hành vi hover với các tệp Java Foo và Bar từ issue, sau đó so sánh Javadoc của phương thức bị ghi đè với đầu ra HTML của công cụ Javadoc. Issue được hoàn tất khi mô tả @param được kế thừa cho i xuất hiện trong cửa sổ bật lên hover, khớp với phương thức cha và hành vi Javadoc được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
EDIT: This issue was originally about the {@inheritDoc} tag, but I realized it's actually caused by something else after some more experimentation.
When method Javadocs are inherited through {@inheritDoc}, the parameter descriptions are not shown in the hover popups.
When hovering over methods that override a parent method, the descriptions for @param tags in the parent's Javadoc are not inherited, which does not match the Javadoc tool's HTML output.
Environment
- Operating System: Ubuntu 18.04/20.04
- JDK version: 11.0.3
- Visual Studio Code version: 1.36.0-insider/1.56.0-insider
- Java extension version: 0.46.0/0.77.0
Steps To Reproduce
- Open a new folder
- Create two Java files:
public class Foo {
/**
* Foo.foo
*
* @param i an int
*/
public int foo(int i) {
return i;
}
}
public class Bar extends Foo {
@Override
public int foo(int i) {
return i;
}
}
- Hover over the
foomethod name inBarto see the Javadoc.
Current Result
When hovering above Bar.foo(int), in the Javadoc popup, the description for the parameter i is empty:

Expected Result
The description for i should be the same as in Foo.foo(int), which is what the Javadoc tool does:

According to the documentation of the Javadoc tool, the missing @param tags should have been inherited from the overridden method. This does work for @return and @throws tags, but not for @param tags.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 547
- Merge trung bình
- 20 giờ 1 phút
- Pull request đã merge (30 ngày)
- 11
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
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
redhat-developer/vscode-java#4426 ·
-
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#4506 · 3 bình luận · 4 reaction ·
-
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#4505 · 2 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
redhat-developer/vscode-java#4504 · 3 bình luận · 1 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
redhat-developer/vscode-java#4502 ·
Tất cả issue của redhat-developer/vscode-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
0xMiden/bridge-portal#132 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area:tools bug good first issue help wanted priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
newrelic-experimental/preflight#793 · 1 bình luận ·