redhat-developer / redhat-developer/vscode-java
Unable to suggest field name in the presence of annotation and compilation errors
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.3k
- Forks
- 546
- Merge medio
- 20 h 1 min
- PR fusionados (30 d)
- 11
Descripción
Environment
- Operating System: Linux x64 5.4.28-1-MANJARO
- JDK version: OpenJDK 11.0.6
- Visual Studio Code version: 1.43.2
- Java extension version: 0.59.0
Hello!
This issue was first reported in the wrong repo (https://github.com/MicrosoftDocs/intellicode/issues/182), but disabling IntelliCode didn't affect the issue, so it was suggested the issue could be in vscode-java. Here it is:
Steps to Reproduce / Scenario:
- Create a class with a method and with an annotation on it. Do some syntax typo on that method.
- Add a new field on the class and wait for the field name suggestion.
- IntelliCode will not be able to suggest the field name.
If you comment out the annotation, it will suggest the field name just fine.
- Create a class with a method without any annotation on it. Do some syntax typo on that method.
- Add a new field on the class and wait for the field name suggestion.
- IntelliCode will suggest the field name just fine.
Here is a gif showing the issue:

This issue particularly bothers when developing with Spring Boot, which uses a lot of annotation. If I try to add a new field on an existent class that has methods with annotation, I'll not get proper name suggestion because while I'm typing private MyField and wait for the name suggestion, my code will already be invalid (with compilation errors), and because of that I'll not get the myField name suggestion.
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
Comienza reproduciendo el problema en VS Code con la Java extension: añade un error de sintaxis a un método anotado, luego añade un campo y compara la sugerencia de nombre con la anotación eliminada. El problema se resuelve cuando las sugerencias de nombres de campo siguen apareciendo en el caso anotado a pesar de los errores de anotación y compilación.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java, typescript, vscode
- Área
- devtools, 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