在 Eclipse 中拼写错误方法名称后如何恢复自动完成?
当我在 Eclipse 中编写 Java 代码时,我喜欢自动完成功能。我的意思是,当您开始输入对象的方法名称时,会出现带有方法名称的弹出窗口。 或者也许它被称为不同的东西,即方法建议?
但是,如果我拼错了方法名称,弹出窗口就会隐藏,并且如果我删除方法名称中拼写错误的部分,它就不会回来。有没有办法在拼写错误后恢复弹出窗口,而无需再次开始输入孔方法名称?
When I am coding Java in Eclipse I like the auto-completion feature. With that I mean the popup with method-names that comes when you start typing in a method name for an object. Or maybe it's called something different, i.e. method-suggestions?
But the popup is hidden if I misspells a method name, and it doesn't come back if I delete the misspelled part of the method name. Is there any way to get back the popup after a misspelling without starting to type in the hole method name again?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
按 Ctrl+ (空白)。有关键盘快捷键的完整列表,请查看 Eclipse 的“首选项”和“常规/按键”。
Press Ctrl+ (Blank). For a complete list of keyboard shortcuts have a look in the eclipse "Preferences" and there "General/Keys".
您还应该查看“首选项”->“Java”->“编辑器”->“内容辅助”。您将能够选择它的行为方式;例如,如果您在单词中间使用它,它应该插入还是覆盖,它是否应该显示不推荐使用的方法,它自动出现之前的延迟,它甚至可以(尝试)根据当前中的变量猜测您的方法参数范围。
You should also check out Preferences->Java->Editor->Content Assist. You'll be able to select how it acts; things like if you use it in the middle of a word should it insert or overwrite, should it show deprecated methods, the delay before it automatically appears, and it can even (try to) guess your method parameters based on the variables in the current scope.
我认为您正在寻找 Ctrl-Space 键盘快捷键。
(在 Eclipse 中,这称为 Content Assist。在 Visual Studio 中,这称为 IntelliSense。)
I think you're after the Ctrl-Space keyboard shortcut.
(In Eclipse this is called Content Assist. In Visual Studio it's called IntelliSense.)