Eclipse CDT indexing of source codes is very important for large projects. Without it you cannot highlight a class or function and right click "open declaration". Manually go through the source tree to find a file is a nightmare.
The index of my C++ project was suddenly broken. I cannot highlight a class member and right click "open declaration". Also when I edit a header file, the outline panel does not show the class members.
I find this link
http://wiki.eclipse.org/CDT/User/FAQ#Why_does_Open_Declaration_.28F3.29_not_work.3F_.28also_applies_to_other_functions_using_the_indexer.29
but it does not work for me.
Then it occurs to me Eclipse no longer treated my project as a C++ project. Finally I got a solution:
Choose menu File/New/Convert to a C/C++ project. It took a while to index the source code. After that, everything works like a charm.
Thanks, you saved my day. None of the common index rebuilding techniques helped.
ReplyDeleteYepp me too. I've some how corrupted my workspace and this solution has worked for me!
DeleteThank you Sam Liu!
Thank you. :)
ReplyDeleteWorked for me as well. Thanks.
ReplyDeleteWorks Great!!!
ReplyDeleteWorks! Thanks
ReplyDelete