redhat-developer / redhat-developer/vscode-java
Find references on annotation attributes should not take annotated type into account
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 547
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
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) 😀
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Reproduce el comportamiento de Go To References en VS Code Java utilizando el ejemplo de anotación, comenzando por el manejo de la búsqueda de referencias para los atributos de anotación. Verifica que seleccionar "cloud" no incluya referencias al tipo PetController, mientras que las selecciones sobre @Controller, @Profile y PetController conserven sus resultados esperados.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, typescript, vscode
- Área
- developer-experience, tooling
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100