redhat-developer / redhat-developer/vscode-java
Find references on annotation attributes should not take annotated type into account
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
@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) 😀
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- 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