unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Francesco Mazzoli <f@mazzo.li>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Forward: Re: JDEE help (was: Emacs and Java)
Date: Sat, 15 Sep 2012 10:28:55 +0100	[thread overview]
Message-ID: <874nmzprc8.wl%f@mazzo.li> (raw)
In-Reply-To: 87a9wrpx73.wl%f@mazzo.li

[-- Attachment #1: Type: text/plain, Size: 159 bytes --]

Hi,

Eli Zaretskii suggested this mailing list for this discussion, you can follow
the original thread here: <http://thread.gmane.org/gmane.emacs.help/86761>


[-- Attachment #2: Type: message/rfc822, Size: 8034 bytes --]

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
Message-ID: <87a9wrpx73.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.



--
Francesco * Often in error, never in doubt

           reply	other threads:[~2012-09-15  9:28 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <87a9wrpx73.wl%f@mazzo.li>]

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nmzprc8.wl%f@mazzo.li \
    --to=f@mazzo.li \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).