jde-compile-option-directory jde-built-class-path jde-run-class-path jde-sourcepath jde-global-classpath 还有很多这些变量,JDEE分得挺细的。你可以查阅:http://jdee.sourceforge.net/jdedoc/html/jde-ug/jde-ug.html 了解到更多的相关变量地功能。还有JDE menu中自定义代码生成的过程。 以上一些变量都是可以通过M-x customize-variable 来进行配置的,你可以选择 set current session把它保存到当前的工程文件prj.el中或者选择set future session自动保存到.emacs配置文件中供所有项目使用。 jde-complete-functions 对这个变量特别做些说明,因为这个变量是设定语义补全的方式的,他有jde-complete-inline,jde-complete-menu,jde-complete-minibuffer三种默认的提示形式,但是都不是特别好用,可以用网上有人开发的一个自定义的补全形式jde-complete-ido,它可以将补全形式和ido和yasnippet结合起来,比较友好,速度也还可以。这个函数地代码如下: 转载:
;;jde completion with ido and yasnippet
(defun jde-complete-ido ()
"Custom method completion for JDE using ido-mode and yasnippet."
(interactive)
(let ((completion-list '()) (variable-at-point (jde-parse-java-variable-at-point)))
(dolist (element (jde-complete-find-completion-for-pair variable-at-point nil) nil)
(add-to-list 'completion-list (cdr element)))
(if completion-list
(let ((choise (ido-completing-read "> " completion-list nil nil (car (cdr variable-at-point)))) (method))
(unless (string-match "^.*()$" choise)
(setq method (replace-regexp-in-string ")" "})"(replace-regexp-in-string ", " "}, ${" (replace-regexp-in-string "(" "(${" choise)))))
(delete-region (point) (re-search-backward "\\." (line-beginning-position)))
(insert ".")
(if method
(yas/expand-snippet method)
(insert choise)))
(message "No completions at this point"))))
(add-hook 'jde-mode-hook 'jde-complete-ido)