[cedet-semantic] Forcing the semantic to parse include files,
Brought to you by:
zappo
From: paul424 <pa...@o2...> - 2012-05-09 09:47:28
|
First hi to all who contribute to this great package as CEDET :D . Without much hussle I am able to get working most of the CEDET futures, but when it comes to senator / semantic things get more tought :\ . Parsing local files are fine. I don't use EDE not to get things more complicated. I use the 1.0.6 git trunk version, for compability with ECB. 1. First is the rumble about the emacs core / cedet git-trunk hussle. How do I check that current installation is running the latter ? ( I have done some .emacs modificaitons see below) . 2. I generally cannot get the proper autocomplete working for external libs - in this case the OGRE3D project, which all are in the /usr/include/OGRE. I suppose I have added to 'search path' include properly, semantic-describe-c-env. sees them added properly. 2.a What are the basic commands to the semantic parser ? , that is I need to force it to parse the desired includes. Once I saw semantic parsing the OGRE files in the 'idle time'. Still the autocomplete does not work ( OGRE:RAY is not recongized as a type). senator-completition-menu-pop gives some non-matching 'c**p' 2.b I know there are customize-group options for semantic, tough their description say little to me. From the other post: "Yes, there is a setup cost. You can use semanticdb.sh to pre-parse your code, but if you never open *every* file, you might end up with Emacs having such a huge data structure it gets larger that your machine can handle. If your project is small, this shouldn't be a problem." Well this might be, if that would parse OGRE. here's my .emacs: ;;******************************************************************************************************************************** ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; File name: ` ~/.emacs ' ;;; --------------------- ;;; ;;; If you need your own personal ~/.emacs ;;; please make a copy of this file ;;; an placein your changes and/or extension. ;;; ;;; Copyright (c) 1997-2002 SuSE Gmbh Nuernberg, Germany. ;;; ;;; Author: Werner Fink, <fee...@su...> 1997,98,99,2002 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Test of Emacs derivates ;; CC-mode ;;(add-hook 'c-mode-hook '(lambda () ;;(setq ac-sources (append '(ac-source-semantic) ac-sources)) ;;(local-set-key (kbd "RET") 'newline-and-indent) ;;(linum-mode t) ;;(semantic-mode t))) ;; CEDET (load-file "~/cedet-1.0.1/common/cedet.el") (global-ede-mode 1) ; Enable the Project management system (semantic-load-enable-excessive-code-helpers) ; Enable prototype help and smart completion (global-srecode-minor-mode 1) ; Enable template insertion menu (require 'semantic-ia) (require 'semantic-gcc) (require 'semanticdb) (semantic-add-system-include "/usr/include/OGRE" 'c++-mode) (semantic-add-system-include "/usr/include/OGRE" 'c-mode) ;;ECB (add-to-list 'load-path "~/.emacs.d/ecb-snap") (require 'ecb-autoloads) ;;; ----------------------- (if (string-match "XEmacs\\|Lucid" emacs-version) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; XEmacs ;;; ------ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (progn (if (file-readable-p "~/.xemacs/init.el") (load "~/.xemacs/init.el" nil t)) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; GNU-Emacs ;;; --------- ;;; load ~/.gnu-emacs or, if not exists /etc/skel/.gnu-emacs ;;; For a description and the settings see /etc/skel/.gnu-emacs ;;; ... for your private ~/.gnu-emacs your are on your one. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (if (file-readable-p "~/.gnu-emacs") (load "~/.gnu-emacs" nil t) (if (file-readable-p "/etc/skel/.gnu-emacs") (load "/etc/skel/.gnu-emacs" nil t))) ;; Custom Settings ;; =============== ;; To avoid any trouble with the customization system of GNU emacs ;; we set the default file ~/.gnu-emacs-custom ;; (setq x-select-enable-clipboard t) (setq-default c-basic-offset 4) ;; ;;FULL AKC (add-to-list 'load-path "~/.emacs.d/full-ack.el") (autoload 'ack-same "full-ack.el" nil t) (autoload 'ack "full-ack.el" nil t) (autoload 'ack-find-same-file "full-ack.el" nil t) (autoload 'ack-find-file "full-ack.el" nil t) ;;DESKTOP (desktop-save-mode 1) (setq history-length 250) (add-to-list 'desktop-globals-to-save 'file-name-history) ;;; ) ;;; (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(delete-selection-mode nil) '(ecb-options-version "2.40") '(global-semantic-show-parser-state-mode t nil (semantic-util-modes)) '(mark-even-if-inactive t) '(scroll-bar-mode (quote right)) '(semantic-edits-verbose-flag t) '(semantic-idle-scheduler-work-idle-time 5) '(semantic-lex-debug-analyzers nil) '(transient-mark-mode 1)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) ;;******************************************************************************************************************************** |