redhat-developer / redhat-developer/vscode-java

Find references on annotation attributes should not take annotated type into account

Aperta
#3,808 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

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 @Controller and executing Go To References shows all references to the Controller type. 👍
  • same for @Profile etc. 👍
  • clicking on PetController and executing Go To References shows all the references to the PetController type. 👍

But:

  • clicking on the "cloud" annotation attribute and executing Go To References shows all the references to the PetController type 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) 😀

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il comportamento di Go To References in VS Code Java utilizzando l’esempio di annotazione, iniziando dalla gestione della ricerca dei riferimenti per gli attributi delle annotazioni. Verifica che la selezione di "cloud" non includa riferimenti al tipo PetController, mentre le selezioni su @Controller, @Profile e PetController mantengano i risultati previsti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.