简体   繁体   中英

Eclipse: ctrl+space completion for main no longer works

I use Eclipse (3.7.1) and I like ctrl+space autocompletion. It used to work for generating a static public void main(String[] args) method but no longer does; instead if I type mai or main and hit Ctrl-space, I get a bunch of Main classes.

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.

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.

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. Here you have to make sure “Java Proposals” is ticked. I am sure it will work,it worked for me.

您可以在New Java Class菜单中选中复选框public static void main(String[] args)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM