redhat-developer / redhat-developer/vscode-java
Javadoc overriding methods not inheriting @param descriptions
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue の Foo および Bar の Java ファイルを使って hover の動作を再現し、次にオーバーライドされたメソッドの Javadoc と Javadoc ツールの HTML 出力を比較します。継承された i 用の @param の説明が hover ポップアップに表示され、親メソッドおよび文書化された Javadoc の動作と一致したら、issue は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100