From: Francesco Mazzoli <f@mazzo.li>
To: help-gnu-emacs@gnu.org
Cc: jdee-users@lists.sourceforge.net
Subject: Re: JDEE help (was: Emacs and Java)
Date: Sat, 15 Sep 2012 08:22:24 +0100 [thread overview]
Message-ID: <87a9wrpx73.wl%f@mazzo.li> (raw)
In-Reply-To: <87har0onhj.wl%f@mazzo.li>
In the end I've bitten the bullet, pulled a fresh svn copy of JDEE, built it and
somehow managed to get it working.
This is my config, mostly taken from the emacswiki article
<http://emacswiki.org/emacs/JavaDevelopmentEnvironment>:
---------------8<---------------
(add-to-list 'load-path (expand-file-name "~/.emacs.d/site-lisp/jdee/lisp"))
(setq semantic-default-submodes '(global-semantic-idle-scheduler-mode
global-semanticdb-minor-mode
global-semantic-idle-summary-mode
global-semantic-stickyfunc-mode
global-semantic-mru-bookmark-mode))
(setq semantic-load-turn-everything-on t)
(semantic-mode 1)
(require 'semantic)
(require 'semantic/senator)
(require 'semantic/ia)
(require 'semantic/wisent)
(require 'semantic/wisent/java-tags)
(setq jde-auto-parse-enable nil)
(setq jde-enable-senator nil)
(load "jde-autoload")
(require 'jde)
(setq jde-ant-enable-find t
jde-build-function 'jde-ant-build
jde-ant-args "compile")
(add-to-list 'auto-mode-alist '("\\.java\\'" . jde-mode))
(push 'jde-mode ac-modes)
(setq jde-jdk '("1.7")
jde-jdk-registry '(("1.6" . "/usr/lib/jvm/java-1.6.0-openjdk-amd64")
("1.7" . "/usr/lib/jvm/java-1.6.0-openjdk-amd64")))
(define-key jde-mode-map (kbd "<f5>") 'jde-build)
(define-key jde-mode-map (kbd "<f6>") 'jde-run)
(defun java-hooks ()
(menu-bar-mode 1)
(wisent-java-default-setup)
(setq c-basic-offset 4)
(setq fill-column 90)
(setq whitespace-line-column 90)
(jde-abbrev-mode))
(add-hook 'jde-mode-hook 'java-hooks)
(add-hook 'java-mode-hook 'java-hooks)
--------------->8---------------
Then for each project I have I create a `prj.el' file something like
(jde-project-file-version "1.0")
(jde-set-variables)
(setq jde-global-classpath '("/path/where/project/classes/are"))
(setq bsh-classpath '("/path/where/project/classes/are"))
This is already a huge improvement, the semantic mode works, and I can compile
and run java classes easily.
However, I still need some help to make some feature work:
* proper completion: right now, if I press `C-c C-v .' the completion works,
but only for classes outside my project. I'm afraid that jde is not picking
up the project classpath for some reason, or something else is going wrong.
Is there a way to force a reload of the classes?
* completion with auto-complete: is it possible to bind in some way the jdee
completions with auto-complete? I could define the ac sources manually but
maybe there is something already...
* beanshell: similar to the problem above, beanshell works (miracle!) but my
project classpath is not included. As you can see I set `bsh-classpath' but
it does not seem to have an effect.
* syntax highlighting: while semantic seems to parse java correctly (I think
that `wisent-java-default-setup' should provide an improved parser),
generics & co. are still not highlighted. Is there a way to make that work?
* tags and semantics: this is more of a semantics question, but I'd like to
jump to semantics tags when I press `M-.' instead of having to type the
horrible `C-c , J' and then specify the name manually.
* flymake: this is not essential, but is it possible to tie the jde
compilation (`jde-build') to flymake?
When I'm done with this I'll write a wiki page documenting the steps to take, I
think that with enough configuration JDEE could be the solution.
Thanks,
Francesco.
next prev parent reply other threads:[~2012-09-15 7:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 11:25 Emacs and Java Francesco Mazzoli
2012-09-14 13:28 ` Eli Zaretskii
2012-09-14 14:14 ` Francesco Mazzoli
2012-09-14 14:32 ` Francesco Mazzoli
2012-09-14 15:01 ` Francesco Mazzoli
2012-09-14 13:35 ` Ludwig, Mark
[not found] ` <CAHW=5p_PBvqzLFa0dFGgTvKS94oU2mn9332G7Ce1VLZwRQjDiQ@mail.gmail.com>
2012-09-14 16:29 ` Grégoire Neuville
2012-09-15 7:25 ` Francesco Mazzoli
2012-09-16 6:53 ` Tom
2012-09-15 0:53 ` Leo
2012-09-15 7:27 ` Francesco Mazzoli
2012-09-15 8:15 ` Eli Zaretskii
2012-09-15 11:17 ` Jambunathan K
2012-09-15 11:48 ` Jambunathan K
2012-09-15 20:57 ` Francesco Mazzoli
2012-09-15 7:22 ` Francesco Mazzoli [this message]
2012-09-15 8:17 ` JDEE help (was: Emacs and Java) Eli Zaretskii
2012-09-15 9:28 ` Forward: " Francesco Mazzoli
2012-09-15 18:39 ` JDEE help Philipp Haselwarter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9wrpx73.wl%f@mazzo.li \
--to=f@mazzo.li \
--cc=help-gnu-emacs@gnu.org \
--cc=jdee-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.