[CEDET-devel] semantic-analyze-possible-completions-default: Cannot find types for `Helllo* heli (N
Brought to you by:
zappo
From: <se...@gm...> - 2010-01-05 06:20:56
|
Hi, cedet, I find my auto completion doesn't work well in my Emacs. My code is #include "stdafx.h" #include <stdio.h> #include "Hello.h" int _tmain(int argc, _TCHAR* argv[]) { Helllo* heli(NULL); heli = new Hello(); heli->Sa return 0; } Hello is a class defined in "Hello.h". When I type "heli->S", then type "Cc ?". The error message comes out. *Message* C++ mode hook Mark set [3 times] semantic-analyze-possible-completions-default: Cannot find types for `Helllo* heli (NULL)' Cannot find types for `Helllo* heli (NULL)' Adding srecode-insert-getset to srecode menu Adding srecode-document-insert-comment to srecode menu When I type "Hello.S", then type "Cc ?". This works well. *Completions* Possible completions are: SayBye SayHi SayWeather It looks semantic doesn't recognize the variable "heli", but class Hello is fine. I am very confused about this. Environement: Windows XP GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) CEDET latest version from CVS Emacs config: ;; Disable Splash Screen (setq inhibit-splash-screen t) ;; Set startup directory (cd "d:/Home") (setq default-directory "d:/Home") ;;---------------- ;; Load path (setq load-path (cons "d:/Home/.emacs.d/site-lisp" load-path)) (setq load-path (cons "d:/Emacs/site-lisp/psgml-1.3.2" load-path)) (setq-default tab-width 4) (setq-default indent-tabs-mode nil) ;; ---------------- ;; Set gnuserv and gnuclient (load-library "gnuserv") (gnuserv-start) (setq gnuserv-frame (selected-frame)) ;;---------------- ;; XML (require 'psgml) ;; Set XML indent offset (setq sgml-basic-offset 2) ;; ----------------- ;; Syntax highlight (global-font-lock-mode t) ;still necessary (setenv "TEMP" "c:/windows/temp") (setenv "TMP" "c:/windows/temp") ;; --------------------- ;; C++ mode ;; C++ and C mode... (defun my-c++-mode-hook () (message "C++ mode hook") (c-set-style "stroustrup") (setq tab-width 4 indent-tabs-mode nil) (local-set-key [(meta f1)] 'ispell-complete-word) ) (defun my-c-mode-hook () (message "C mode hook") (c-set-style "stroustrup") (setq tab-width 4 indent-tabs-mode nil) ) ;; Add all of the hooks... (add-hook 'c++-mode-hook 'my-c++-mode-hook) (add-hook 'c-mode-hook 'my-c-mode-hook) ;; ------------------ ;; CEDET (load-file "~/.emacs.d/site-lisp/cedet-1.0pre6/common/cedet.el") ;; (global-ede-mode 1) ; Enable the Project management system (require 'semantic-ia) (require 'semanticdb) (require 'semanticdb-file) (require 'semantic-gcc) (semantic-load-enable-excessive-code-helpers) ;;(semantic-load-enable-semantic-debugging-helpers) ;; (semantic-load-enable-code-helpers) ; Enable prototype help and smart completion (global-srecode-minor-mode 1) ; Enable template insertion menu ;; Add system header file into semantic analysis (semantic-add-system-include "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include" 'c++-mode) (setq semanticdb-default-system-save-directory "~/.emacs.d/semanticdb") (semanticdb-create-ebrowse-database "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include") ;; (semanticdb-create-cscope-database "C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\include") (defun my-semantic-hook () (imenu-add-to-menubar "TAGS")) (add-hook 'semantic-init-hooks 'my-semantic-hook) ;; customisation of modes (defun my-cedet-hook () (local-set-key [(control return)] 'semantic-ia-complete-symbol-menu) (local-set-key "\Cc?" 'semantic-ia-complete-symbol) ;; (local-set-key "\Cc>" 'semantic-complete-analyze-inline) (local-set-key "\Cc=" 'semantic-decoration-include-visit) (local-set-key "\C-cj" 'semantic-ia-fast-jump) (local-set-key "\C-cq" 'semantic-ia-show-doc) (local-set-key "\C-cs" 'semantic-ia-show-summary) (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle) ) ;;(add-hook 'semantic-init-hooks 'my-cedet-hook) (add-hook 'c-mode-common-hook 'my-cedet-hook) (add-hook 'lisp-mode-hook 'my-cedet-hook) (add-hook 'emacs-lisp-mode-hook 'my-cedet-hook) ;; (add-hook 'erlang-mode-hook 'my-cedet-hook) (require 'eassist) (defun my-c-mode-cedet-hook () (local-set-key "." 'semantic-complete-self-insert) (local-set-key ">" 'semantic-complete-self-insert) (local-set-key "\C-ct" 'eassist-switch-h-cpp) (local-set-key "\C-xt" 'eassist-switch-h-cpp) (local-set-key "\C-ce" 'eassist-list-methods) (local-set-key "\Cc\Cr" 'semantic-symref) ) (add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook) (global-semanticdb-minor-mode 1) (custom-set-variables '(semantic-idle-scheduler-idle-time 3) '(semantic-self-insert-show-completion-function (lambda nil (semantic-ia-complete-symbol-menu (point)))) '(global-semantic-tag-folding-mode t nil (semantic-util-modes))) (global-semantic-folding-mode 1) ;; gnu global support (require 'semanticdb-global) ;;(semanticdb-enable-gnu-global-databases 'c-mode) ;;(semanticdb-enable-gnu-global-databases 'c++-mode) (autoload 'c++-mode "cc-mode" "C++ Editing Mode" t) ;; color theme (require 'color-theme) (color-theme-initialize) ;;(color-theme-classic) (color-theme-gnome2) ;; ECB (add-to-list 'load-path "~\\.emacs.d\\site-lisp\\ecb-2.40") (require 'ecb) |