redhat-developer / redhat-developer/vscode-java

Classes often won't show up when typing, but complete just fine in an import statement.

Ouverte
#3,679 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

upstream
Langage dominant
TypeScript
Étoiles
2.3k
Forks
546
Merge moyen
20 h 1 min
PR mergées (30 j)
11

Description

Had already used import org.springframework.security.test.context.support.WithMockUser; without issue.
Tried adding @WithSecurityContext to same class.

As I was typing, only 4 With* classes showed up (there are 6), and not the one I needed.

I go up to the imports, duplicate the WithMockUser line, delete "MockUser", hit Ctrl+Space, and all 6 With* classes show up! Why does it work here, but not at the class annotation?

I expect these would always show up.

I expect that after typing the full proper class name, that Ctrl+. would find the class and offer to import it.

If I type "@With", hit Ctrl+Space to bring up completion (still just shows the 4), continue with "Se", the suggestions are logical, but once I hit "c" I would expect the suggestions to go away, as there are no more logical ones. However, it stays up - no matter how much I hit Ctrl+Space to update it. (It appears like me activating it with my earlier Ctrl+Space has now prevented it from closing, even when the data is completed outdated, until you click away or hit Esc.)

Having a single minor issue preventing virtually all completion from working is already annoying enough, can't we have at least 1 thing that's nice?

Environment
  • Operating System: Windows 10 + WSL 2 Ubuntu
  • JDK version: WSL 2 Ubuntu openjdk-21
  • Visual Studio Code version: 1.90.2
  • Java extension version: 1.31.0
  • Spring Initializer project init'd a few days ago - current.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Reproduire le comportement de complétion dans l’environnement Windows 10/WSL 2 Ubuntu signalé, avec VS Code 1.90.2, Java extension 1.31.0 et JDK 21, en utilisant l’exemple Spring Security du rapport. Suivre le point d’entrée de la complétion Java et comparer la complétion d’annotations à la complétion d’imports ; le travail est terminé lorsque les classes correspondantes apparaissent systématiquement et que les suggestions obsolètes se ferment ou s’actualisent lorsque le nom saisi ne correspond plus.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java, typescript, vscode
Domaine
developer-experience, tooling
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.