[cedet-semantic] code completion issues
Brought to you by:
zappo
From: Rodrigo C. <rod...@gm...> - 2009-11-28 16:59:25
|
Hi, I have the following lines in my '.emacs': " ;; cedet configuration/mode. (global-ede-mode 1) (global-semanticdb-minor-mode 1) (global-srecode-minor-mode 1) (require 'semanticdb) (global-semanticdb-minor-mode 1) ;;If you use GCC for programming in C & C++, then Semantic can automatically find path, where system include files are located. To do this, you need to load semantic-gcc package with following command: (require 'semantic-gcc) ;; ;; if you want to enable support for gnu global (require 'semanticdb-global) (semanticdb-enable-gnu-global-databases 'c-mode) (semanticdb-enable-gnu-global-databases 'c++-mode) ;; ;; Explicitly specify additional paths for look up of include files (semantic-add-system-include "/usr/include" 'c++-mode) (semantic-add-system-include "/usr/include/c++/4.4" 'c++-mode) (semantic-add-system-include "/usr/include/c++/4.4/bits" 'c++-mode) ;; (semantic-add-system-include "/usr/local/include" 'c++-mode) (semantic-add-system-include "/home/dvp/build/x86_linux_g++/include/" 'c++-mode) ;; ;; Explicitly generate tags databases for often used directories (/usr/include, /usr/local/include, etc.) ;;(semanticdb-create-ebrowse-database "/home/dvp/build/x86_linux_g++/include/") ;; (semanticdb-create-ebrowse-database "/usr/include") ;; (semanticdb-create-ebrowse-database "/usr/local/include") ;; # enables only minimum of necessary features — keep syntactic information for current buffer up-to date, storing of syntactic information for later use (Semanticdb), and loading of corresponding information with Semanticdb and Ebrowse; ;; enables senator-minor-mode for navigation in buffer, semantic-mru-bookmark-mode for storing positions of visited tags, and semantic-idle-summary-mode, that shows information about tag under point; ;; enables semantic-stickyfunc-name that displays name of current function in topmost line of buffer, semantic-decoration-mode to decorate tags, using different faces, and semantic-idle-completion-mode for automatic generation of possible names completions, if user stops his work for some time; ;; enables which-func-mode, that shows name of current function in status line; (semantic-load-enable-excessive-code-helpers) ;; To use additional features for names completion, and displaying of information for tags & classes (require 'semantic-ia) ;; Semanticdb can use databases generated by external utilities — gtags from GNU Global, ctags, ebrowse & cscope. To activate this you can use following code: ;; enable ctags for some languages: ;; Unix Shell, Perl, Pascal, Tcl, Fortran, Asm (semantic-load-enable-all-exuberent-ctags-support) ;; Implements folding functionality (global-semantic-tag-folding-mode 1) ;; Search will performe only in given tags. (senator-isearch-toggle-semantic-mode) ;; In this mode names completions are shown automatically if user stops its work for a some time (idle time). By default, only first possible completion is shown, and user can use the TAB key to navigate through list of possible completions. ;;(semantic-idle-completions-mode 1) ;; semantic mode ;;(semantic-load-enable-minimum-features) ;;(semantic-load-enable-semantic-debugging-helpers) ;;(semantic-load-enable-code-helpers) ;;(semantic-load-enable-gaudy-code-helpers) ;;(semantic-complete-analyze-inline) ;; semantic-db mode (semanticdb-enable-gnu-global-databases 'c-mode) (semanticdb-enable-gnu-global-databases 'c++-mode) " If I create this file: " #include <vector> int main ( ) { vector<int> v; v. " When I type the '.' after the 'v', I get the message: " Cannot find types for `"v"' " What should I do to get 'semantic' to complete symbols from C++ headers? Thanks a lot! -- Rodrigo Canellas |