Re[1]: [cedet-semantic] code completion for C++
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2005-01-11 12:27:20
|
Hi, If you have too many troubles with semantic 1.4.4, I recommend the latest cedet beta (1.0beta3b) which has betas of semantic 2 in it. Semantic 1.4 does not have an automated way to visit lots of files. You can create a keyboard macro to visit all your .c files in a dired mode though. Currently, in all released of semantic, it is problematic to get a C file project too look into system header files, though there is a new "system" database you can build with a script in semantic 2.0 like this: M-x semanticdb-create-system-database RET path/to/sysinclude RET The problem is that recursing through all the header files can be very slow... to the point where it is excruciatingly painful, so I disabled a recursive depth past 1. In addition, the C parser has some difficulty with more complex templates. I have no idea if it will be able to handle the boost libraries which I understand as being quite complex. The current state of "smart completion" is very early yet. It seems to work well for most basic cases. What it really needs is some sort of high-speed back end for searching through very large symbol tables in a controlled manner. These are problems that need to be dealt with and are most certainly on my shorter term todo list. Eric >>> Thomas Porschberg <tho...@os...> seems to think that: >Hi, >I'm doing my first steps with semantic 1.4.4 in >GNU-emacs 21.2.1 for C++ editing under linux. > >I wrote a small "program" for test purpose: > >int main() >{ > int aNumber = 1; > aNumber = 3; > return 0; >} > >The variable aNumber is completed fine if I call >"semantic-ia-complete-symbol". > >However if I extend the code, say: > >#include <vector> > >int main() >{ > int aNumber = 1; > aNumber = 3; > > std::vector<int> tmp; > tmp.push_back(1); //not recognized > return 0; >} > >The push_back method of the vector id not offered to me. >Message: No smart completion found. > >How can I import the C++ standard components under /usr/include/g++ >to semantics so that code completion works ? >I also want try to import the whole boost libraries. >I tried: > >(setq semanticdb-project-roots > (list "/opt/software/boost_1_30_0" > "/usr/include/g++" > "/home/pberg/test_semantics")) > >but that is obviously not enough. > >The documentation at http://cedet.sourceforge.net/intellisense.shtml says: > >>The next step is to force Emacs to parse all your files into databases. >>Unfortunately, this is currently best done by just visiting all the files you care about, >>and letting semantic parse them. > >But how can automate this visiting for a whole directory ? > >Thomas > > -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |