redhat-developer / redhat-developer/vscode-java
Find references on annotation attributes should not take annotated type into account
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 2.3k
- フォーク
- 546
- 平均マージ
- 20時間 1分
- マージ済み PR(30日)
- 11
説明
I have a class starting like this:
@Controller
@RequestMapping("/owners/{ownerId}")
@Profile("cloud")
class PetController {
It looks like executing Go To References while clicking on the annotation attributes uses the annotated type as the element to find references for - which should not be the case in my opinion.
Example:
- clicking on
@Controllerand executingGo To Referencesshows all references to theControllertype. 👍 - same for
@Profileetc. 👍 - clicking on
PetControllerand executingGo To Referencesshows all the references to thePetControllertype. 👍
But:
- clicking on the
"cloud"annotation attribute and executingGo To Referencesshows all the references to thePetControllertype as well. 😱 This should return no references, I think.
Background:
We have functionality in place in the Spring Tools that finds references to that specific "cloud" attribute in your code, but the results gets merged with references to the PetController type, which is not a great result (at least from what we are trying to achieve) 😀
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
アノテーションの例を使用し、アノテーション属性の参照検索の処理から始めて、VS Code Java における Go To References の動作を再現します。"cloud" を選択したときに PetController 型の参照が含まれないこと、@Controller、@Profile、PetController を選択した場合は期待される結果が維持されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, typescript, vscode
- 領域
- developer-experience, tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100