redhat-developer / redhat-developer/vscode-java
Find references on annotation attributes should not take annotated type into account
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.3k
- Forks
- 546
- Ø Merge
- 20 Std. 1 Min.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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) 😀
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Verhalten von Go To References in VS Code Java anhand des Annotation-Beispiels, ausgehend von der Verarbeitung der Referenzsuche für Annotation-Attribute. Überprüfe, dass die Auswahl von "cloud" keine Typreferenzen auf PetController enthält, während Auswahlen auf @Controller, @Profile und PetController ihre erwarteten Ergebnisse beibehalten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, typescript, vscode
- Bereich
- developer-experience, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100