redhat-developer / redhat-developer/vscode-java

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

Abierto
#3,808 1 comentario 0 reacciones 0 asignados Ver en GitHub

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 @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) 😀

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. 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

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.