[英]Eclipse: ctrl+space completion for main no longer works
I use Eclipse (3.7.1) and I like ctrl+space autocompletion. 我使用Eclipse(3.7.1),我喜欢ctrl + space autocompletion。 It used to work for generating a
static public void main(String[] args)
method but no longer does; 它曾经用于生成
static public void main(String[] args)
方法,但不再适用; instead if I type mai
or main
and hit Ctrl-space, I get a bunch of Main
classes. 相反,如果我键入
mai
或main
并按Ctrl-空格键,我会得到一堆Main
类。
What's going on, and how can I fix this? 发生了什么,我该如何解决这个问题?
for what it's worth, I have Lombok 0.9.3 installed, so I wonder if that's messing things up. 为了它的价值,我安装了Lombok 0.9.3,所以我想知道这是不是搞乱了。
Had you been playing around with content assist settings? 你一直在玩内容辅助设置吗?
One quick try would be going to Window->Preferences and then choosing Java->Editor->Content Assist. 一个快速尝试将转到Window-> Preferences然后选择Java-> Editor-> Content Assist。
On Content assist property pane press 'Restore Defaults' 在内容辅助属性窗格中按“恢复默认值”
or 要么
set "Sort proposals" to "alphabetically" - this should restore default content assist behavior. 将“排序提案”设置为“按字母顺序” - 这应该恢复默认内容辅助行为。
In your eclipse Go to Windows-->Preferences --> Java --> Editor --> Content Assist --> Advanced. 在你的日食中转到Windows - >首选项 - > Java - >编辑器 - >内容辅助 - >高级。 Here you have to make sure “Java Proposals” is ticked.
在这里,您必须确保勾选“Java Proposals”。 I am sure it will work,it worked for me.
我相信它会起作用,它对我有用。
您可以在New Java Class
菜单中选中复选框public static void main(String[] args)
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.