views:

267

answers:

2

Hi, I'm a Java developer and I've downloaded the Eclipse for C (course purposes) and to my amazement the control+space shortcut (for autocomplete) did not work. I've created a new project and a new class using the wizzards and started to type "print" and then tried to find an autocomplete feature. After a bit of googling I arrived at C/C++->Editor->Content Assist->Advanced and there I verified that Help proposals,Parsing-based proposals and Template proposals options were checked. I then went over to the Keys preferences page using the link at that page and entered a binding for all relevant content assist from before C\C++ Content Assist (type...) and chose in the When box the C\C++ Editor option. But alas no autocompletion was offered. Can someone please point me to the right direction?

Thanks, Ittai

UPDATE: I'm accepting the answer not because I'm sure it's right but because I've realised I've made some mistakes with the configuration of the eclipse and have seen that with another installation/configuration (i.e. a friend of mines) eclipse does auto complete, even if it still lack many of the java version features.

+1  A: 

Although the eclipse doesn't provide perfect auto-complete, but it works.. This sometimes happens when you have the indexer turned off.

Try to enable the indexer and rebuild the index.

See this question in CDT FAQ. It contains info about how to find indexer error which might prevent auto-complete.

Yousf
Tried it, but unfortunately it didn't work, thanks though
Ittai
A: 

I'm no Eclipse expert (and I don't even play one on TV), but it might be that it only autocompletes function names that are declared in the current scope - have you added #include <stdio.h> to the top of your source file to get the declarations for the standard I/O functions?

caf