redhat-developer / redhat-developer/vscode-java

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

未关闭
#3,679 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

upstream
主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在报告所述的 Windows 10/WSL 2 Ubuntu 环境中,使用 VS Code 1.90.2、Java extension 1.31.0 和 JDK 21,以及报告中的 Spring Security 示例,重现补全行为。跟踪 Java 补全入口点,并比较注解补全与 import 补全;完成标准是匹配的类能够稳定出现,并且当输入的名称不再匹配时,过时的建议会关闭或刷新。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, typescript, vscode
领域
developer-experience, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。