Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting up Emacs 23.4, CEDET 1.1, and SemanticDB to use GNU Global on Windows
    text
    copied!<p>I've been trying to get my Emacs config for Java development working. It's pretty good - I've gotten malabar-mode working and have GNU Global working for tag browsing. The one thing I can't get working is getting semanticdb to use gnu global properly. None of my imports are found.</p> <p>First, this is a Maven multi-module project with all sources checked out from the top-level root project folder. All other projects are below this one in the directory tree. There is a single GTAGS database in this root folder covering everything.</p> <p>Things that work:</p> <ul> <li><code>M-x gtags-find-tag RET symbol RET</code> works fine, so the database is good and global can find it.</li> <li><code>M-x cedet-gnu-global-version-check</code> works and reports that my version is good.</li> <li><code>M-x cedet-gnu-global-expand-filename</code> works</li> <li><code>M-x semanticdb-find-test-translate-path</code> shows a "GNU Global Search Table" when in a Java buffer</li> <li>I have the JDK source folder set as a system include folder, so core Java imports are parsed properly.</li> </ul> <p>My java config is as follows (cedet initialization is earlier in the file):</p> <pre><code>(add-local-load-path "malabar/lisp") (require 'malabar-mode) (setq malabar-groovy-lib-dir (concat emacs-local-site-lisp "malabar/lib")) (add-to-list 'auto-mode-alist '("\\.java\\'" . malabar-mode)) ;; enable semanticdb support for gnu global (when (cedet-gnu-global-version-check t) (semanticdb-enable-gnu-global-databases 'java-mode)) (add-hook 'java-mode-hook (lambda () (gtags-mode 1))) (add-hook 'java-mode-hook 'flymake-mode-on) (defun my-java-flymake-init () (list "javac" (list (flymake-init-create-temp-buffer-copy 'flymake-create-temp-with-folder-structure)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.java$" my-java-flymake-init flymake-simple-cleanup)) (add-hook 'java-mode-hook '(lambda () (semantic-add-system-include (getenv "JAVA_HOME") 'java-mode))) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload