Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse autocomplete not working in some Java files

I have noticed that autocomplete is not working in some of java files in Eclipse. Also, the files where autocomplete is not working, display a hollow "J" as the icon for the Java file. The files where autocomplete is working, icon for java file is a filled "J"

I am wondering if someone can point out what went wrong all of suddent, why the change in icons and why autocomplete and syntax highlighting is turned-off in the files with a hollow "J" icon?

Thanks.

update

Basically, I was doing what VonC has suggested but Eclipse was not refreshing that it why I was thinking that VonC's suggestion isn't working, after doing a refresh, the problem resolved.

like image 532
m_a_khan Avatar asked Mar 05 '10 22:03

m_a_khan


People also ask

How do I trigger an autocomplete in Eclipse?

By default Eclipse triggers the autocompletion after a certain delay when you insert a dot. This is sensible because the dot signals the IDE for example that you got an instance of a class and want to call a method on it. You can bring up the autocompletion by manually pressing Cmd plus Space whenever you want.

Why does Eclipse not show IntelliSense?

Try this: Go to Preferences » Java » Editor » Content Assist » Advanced. Make sure Other Java Proposals is ticked/checked.


1 Answers

Since this question is highly ranked on Google, I will add a solution to fix general auto complete issue, not for 'hollow J' ones.

Try Window (Windows/Linux) or Eclipse (OS X) -> Preferences -> Java -> Editor -> Content Assist -> Restore Defaults

also

Content Assist -> Advanced -> Restore Defaults

like image 140
bronze Avatar answered Sep 25 '22 09:09

bronze