1

guys

I installed jdee in my emacs and it works well, but I fins that it cannot active auto-complete.

Example: When I open a new .java file in emacs, and I input "imp", auto-complete cannot active.

The problem is .java file open in emacs in "jdee-mode" because jdee. But the auto-complete only work on "java-mode", the evidence is AC works well when I change the jave-mode filename, which in AC/dict, to jdee-mode.

So I thought two solutions about this:

  1. make AC use java-mode even in jdee-mode
  2. make emacs change the filename of java-mode to jdee-mode after every update jdee.

Dose anyone know how to make them? Or has better solution?

Thank you!

4

2 回答 2

2

JDEE 还不支持自动完成或公司模式。但它确实有自己的完成机制。要使用它,请在您的项目目录中创建 JDEE 项目文件 (prj.el),其中包含以下内容:

(jdee-project-file-version "1.0")
(jdee-set-variables
 '(jdee-compile-option-classpath (quote ("./out")))
 '(jdee-compile-option-directory "./out")
 '(jdee-built-class-path (quote ("./out")))
 '(jdee-db-option-classpath (quote ("./out")))
 '(jdee-run-option-classpath (quote ("./out")))
 '(jdee-run-working-directory ".")
 '(jdee-sourcepath (quote ("./src"))))

“./out”是编译类的路径。“./src”是你的源的路径。JDEE 需要位于 GH ( http://github.com/jdee-emacs/jdee-server ) 的 JDEE-Server。然后,您可以转到项目中的 Java 文件并执行“jdee-complete-menu”。这是来自 MELPA 的 JDEE

于 2016-01-31T16:28:00.377 回答
0

您也可以添加jde-modeac-modes使 ACjde-mode也可以使用。

(add-to-list 'ac-modes 'jde-mode)
于 2016-01-27T02:39:56.320 回答