Discussion:
Is JDEE moribund? Is Emacs a viable Java devel environment?
(too old to reply)
Martin
2009-04-17 13:15:39 UTC
Permalink
I recently started doing some Java work again for the first time in
several years, and I looked around to see the state of Java
development using Emacs. The first Google hit for "emacs java" was a
package called JDEE, which seemed like just what I wanted, and I found
a lot of positive comments on it. I ran into a snag while trying to
install it, though, so I subscribed to the jdee-users mailing list and
posted about my problem. After a few days without an answer, I mailed
the package maintainer directly. It's been two weeks now, and I
haven't gotten any response, nor have I seen any traffic at all on the
jdee-users list. Does anyone still use it anymore? If not, what
other options for Java development on Emacs are there?
Lately I've been using Eclipse and Emacs in tandem, editing in Emacs
and using Eclipse for everything else. It's a good enough arrangement
to get by, but I'd sure love it if Emacs could shoulder more of the
work.
http://dir.gmane.org/search.php?match=jdee
e***@gmail.com
2009-04-17 06:03:12 UTC
Permalink
I recently started doing some Java work again for the first time in
several years, and I looked around to see the state of Java
development using Emacs. The first Google hit for "emacs java" was a
package called JDEE, which seemed like just what I wanted, and I found
a lot of positive comments on it. I ran into a snag while trying to
install it, though, so I subscribed to the jdee-users mailing list and
posted about my problem. After a few days without an answer, I mailed
the package maintainer directly. It's been two weeks now, and I
haven't gotten any response, nor have I seen any traffic at all on the
jdee-users list. Does anyone still use it anymore? If not, what
other options for Java development on Emacs are there?

Lately I've been using Eclipse and Emacs in tandem, editing in Emacs
and using Eclipse for everything else. It's a good enough arrangement
to get by, but I'd sure love it if Emacs could shoulder more of the
work.
hazlup
2009-04-17 18:01:23 UTC
Permalink
Got room in that boat for me. Using eclipse/net-beans/ide-de-jour still
requires a decent editor! Especially for console output one can actually
find things in, play with etc to see what's really going on. The lame
emacs-binding in eclipse make it nearly tolerable. At least C-x C-s doesn't
destroy things and freeze the screen!
I recently started doing some Java work again for the first time in
several years, and I looked around to see the state of Java
development using Emacs. The first Google hit for "emacs java" was a
package called JDEE, which seemed like just what I wanted, and I found
a lot of positive comments on it. I ran into a snag while trying to
install it, though, so I subscribed to the jdee-users mailing list and
posted about my problem. After a few days without an answer, I mailed
the package maintainer directly. It's been two weeks now, and I
haven't gotten any response, nor have I seen any traffic at all on the
jdee-users list. Does anyone still use it anymore? If not, what
other options for Java development on Emacs are there?
Lately I've been using Eclipse and Emacs in tandem, editing in Emacs
and using Eclipse for everything else. It's a good enough arrangement
to get by, but I'd sure love it if Emacs could shoulder more of the
work.
--
View this message in context: http://www.nabble.com/Is-JDEE-moribund--Is-Emacs-a-viable-Java-devel-environment--tp23098090p23102804.html
Sent from the Emacs - Help mailing list archive at Nabble.com.
Richard Riley
2009-04-17 17:28:10 UTC
Permalink
Post by Martin
I recently started doing some Java work again for the first time in
several years, and I looked around to see the state of Java
development using Emacs. The first Google hit for "emacs java" was a
package called JDEE, which seemed like just what I wanted, and I found
a lot of positive comments on it. I ran into a snag while trying to
install it, though, so I subscribed to the jdee-users mailing list and
posted about my problem. After a few days without an answer, I mailed
the package maintainer directly. It's been two weeks now, and I
haven't gotten any response, nor have I seen any traffic at all on the
jdee-users list. Does anyone still use it anymore? If not, what
other options for Java development on Emacs are there?
Lately I've been using Eclipse and Emacs in tandem, editing in Emacs
and using Eclipse for everything else. It's a good enough arrangement
to get by, but I'd sure love it if Emacs could shoulder more of the
work.
http://dir.gmane.org/search.php?match=jdee
I'm wondering what that offers over the mailing list? It seems pretty
dead. In fact it is the mailing list isn't it?
Tassilo Horn
2009-04-17 19:50:29 UTC
Permalink
Richard Riley <***@googlemail.com> writes:

Hi Richard,
Post by Richard Riley
Post by Martin
http://dir.gmane.org/search.php?match=jdee
I'm wondering what that offers over the mailing list? It seems pretty
dead. In fact it is the mailing list isn't it?
Yep, it is.

I hope someone starts writing an emacs interface to Eclim [1] anytime
soon. I had a quick look at the sources and it shouldn't be too hard,
but it's quite a lot to do (to get all eclipse features).

To me it seems that most java programmers use eclipse (or netbeans)
anyway or switched to eclipse/NB, and there's noone feels preasured to
enhance emacs in that direction. And you can count me as one of those,
sadly. But I'm pretty sure that if someone would create an emacs
interface to let's say only the autocompletion feature of eclipse using
eclim, things would get running on their own.

Bye,
Tassilo
__________
[1] http://eclim.sourceforge.net/
--
Viruses can't infect RMS's machine because there is nothing to
infect. RMS memorises all his documents. In binary. He just types
everything in whenever he needs a document.
Lennart Borgman
2009-04-17 22:08:12 UTC
Permalink
Post by Tassilo Horn
Hi Richard,
Post by Richard Riley
Post by Martin
http://dir.gmane.org/search.php?match=jdee
I'm wondering what that offers over the mailing list? It seems pretty
dead. In fact it is the mailing list isn't it?
Yep, it is.
I hope someone starts writing an emacs interface to Eclim [1] anytime
soon.  I had a quick look at the sources and it shouldn't be too hard,
but it's quite a lot to do (to get all eclipse features).
To me it seems that most java programmers use eclipse (or netbeans)
anyway or switched to eclipse/NB, and there's noone feels preasured to
enhance emacs in that direction.  And you can count me as one of those,
sadly.  But I'm pretty sure that if someone would create an emacs
interface to let's say only the autocompletion feature of eclipse using
eclim, things would get running on their own.
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim? Why not mention the
possibility on the cedet dev list?
Tassilo Horn
2009-04-17 22:52:16 UTC
Permalink
Lennart Borgman <***@gmail.com> writes:

Hi Lennart,
Post by Lennart Borgman
Post by Tassilo Horn
I hope someone starts writing an emacs interface to Eclim [1] anytime
soon.  I had a quick look at the sources and it shouldn't be too
hard, but it's quite a lot to do (to get all eclipse features).
To me it seems that most java programmers use eclipse (or netbeans)
anyway or switched to eclipse/NB, and there's noone feels preasured
to enhance emacs in that direction.  And you can count me as one of
those, sadly.  But I'm pretty sure that if someone would create an
emacs interface to let's say only the autocompletion feature of
eclipse using eclim, things would get running on their own.
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim?
CEDET uses another approach. It has it's own parsers and analyzers
which enable it to do smart autocompletion and other intelligent stuff.
This works quite well for C/C++, because Eric has put a lot of effort
into it, and I highly appreciate that.

The eclim approach is very different. Here an headless eclipse instance
runs as a server in the background. Vim does no intelligent source code
analysis, instead it sends only a plain text command to eclipse like:

I'm in project Foo in file src/bar/Baz.java on position 18271 and now
I executed the completion command. Gimme the completion list,
please.

And so does eclipse. Here the editors task is only to issue commands,
let eclipse do the intelligent stuff, get back the results, and display
it. Very simple.

IMO this is a great approach, because speaking honestly: Emacs cannot
compete with eclipse for java (and probably other new, nifty languages
like scala or groovy). They have far more developers and academia as
well as industry are focused on it.

Anyway, no reason for sadness, the functionality is there ready for
consumption. So instead of reinventing the wheel, we should combine
emacs' unsurpassed editing capabilities (eclipse extremely sucks in that
respect) with eclipse's intelligent features where those are better than
the emacs counterparts.

Bye,
Tassilo
Lennart Borgman
2009-04-17 23:32:25 UTC
Permalink
Post by Tassilo Horn
Hi Lennart,
Hi Tassilo,
Post by Tassilo Horn
Post by Lennart Borgman
Post by Tassilo Horn
I hope someone starts writing an emacs interface to Eclim [1] anytime
soon.  I had a quick look at the sources and it shouldn't be too
hard, but it's quite a lot to do (to get all eclipse features).
To me it seems that most java programmers use eclipse (or netbeans)
anyway or switched to eclipse/NB, and there's noone feels preasured
to enhance emacs in that direction.  And you can count me as one of
those, sadly.  But I'm pretty sure that if someone would create an
emacs interface to let's say only the autocompletion feature of
eclipse using eclim, things would get running on their own.
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim?
CEDET uses another approach.  It has it's own parsers and analyzers
which enable it to do smart autocompletion and other intelligent stuff.
This works quite well for C/C++, because Eric has put a lot of effort
into it, and I highly appreciate that.
Maybe I am misunderstanding this, but I thought that CEDET is written
so that it can use external parsers etc.
Post by Tassilo Horn
The eclim approach is very different.  Here an headless eclipse instance
runs as a server in the background.  Vim does no intelligent source code
  I'm in project Foo in file src/bar/Baz.java on position 18271 and now
  I executed the completion command.  Gimme the completion list,
  please.
And so does eclipse.  Here the editors task is only to issue commands,
let eclipse do the intelligent stuff, get back the results, and display
it.  Very simple.
IMO this is a great approach, because speaking honestly: Emacs cannot
compete with eclipse for java (and probably other new, nifty languages
like scala or groovy).  They have far more developers and academia as
well as industry are focused on it.
Anyway, no reason for sadness, the functionality is there ready for
consumption.  So instead of reinventing the wheel, we should combine
emacs' unsurpassed editing capabilities (eclipse extremely sucks in that
respect) with eclipse's intelligent features where those are better than
the emacs counterparts.
Bye,
Tassilo
David Engster
2009-04-18 08:05:55 UTC
Permalink
Post by Lennart Borgman
Post by Tassilo Horn
CEDET uses another approach.  It has it's own parsers and analyzers
which enable it to do smart autocompletion and other intelligent stuff.
This works quite well for C/C++, because Eric has put a lot of effort
into it, and I highly appreciate that.
Maybe I am misunderstanding this, but I thought that CEDET is written
so that it can use external parsers etc.
Yes. CEDET has a very flexible API which allows to integrate almost any
external parsing engine.

http://cedet.sourceforge.net/addtool.shtml

It seems there actually is a Java grammar in CEDET, but apparently most
of the database stuff is not implemented, which is why it currently only
does local completion. I remember Joakim Verona doing some stuff on Java
support in CEDET, using Clojure.
Post by Lennart Borgman
Post by Tassilo Horn
The eclim approach is very different.  Here an headless eclipse instance
runs as a server in the background.  Vim does no intelligent source code
  I'm in project Foo in file src/bar/Baz.java on position 18271 and now
  I executed the completion command.  Gimme the completion list,
  please.
You can surely interface CEDET with this. I guess the information from
eclim can be used in CEDET as a so called "omniscient database". For an
example, have a look at semanticdb-global.el, which implements the GNU
Global support for CEDET. The file semanticdb-skel.el has some
commentary on which functions have to be implemented. For more
information, just ask on the CEDET mailing list.

-David
Tassilo Horn
2009-04-18 11:32:24 UTC
Permalink
Lennart Borgman <***@gmail.com> writes:

Hi Lennart,
Post by Lennart Borgman
Post by Tassilo Horn
Post by Lennart Borgman
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim?
CEDET uses another approach.  It has it's own parsers and analyzers
which enable it to do smart autocompletion and other intelligent
stuff. This works quite well for C/C++, because Eric has put a lot
of effort into it, and I highly appreciate that.
Maybe I am misunderstanding this, but I thought that CEDET is written
so that it can use external parsers etc.
No, AFAIK CEDET uses it's own wisent parser generator and its own
grammars. And even if you get the syntax tree out of that parser, it's
a long way to do something sophisticated with it.

Eclim lets the editor do what it can do best -- editing text. If it's
capable of issuing commands on the command line and receiving the
output, then it can use all of eclipse's intelligence. I think this a
good deal. Eclipse will never become a decent editor, and emacs has not
the resources to catch up when it comes to understanding and analyzing
java (and probably other languages such as Scala) source code.

Bye,
Tassilo
--
No person, no idea, and no religion deserves to be illegal to insult,
not even the Church of Emacs. (Richard M. Stallman)
Lennart Borgman
2009-04-18 12:33:28 UTC
Permalink
Post by Tassilo Horn
Hi Lennart,
Post by Lennart Borgman
Post by Tassilo Horn
Post by Lennart Borgman
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim?
CEDET uses another approach.  It has it's own parsers and analyzers
which enable it to do smart autocompletion and other intelligent
stuff.  This works quite well for C/C++, because Eric has put a lot
of effort into it, and I highly appreciate that.
Maybe I am misunderstanding this, but I thought that CEDET is written
so that it can use external parsers etc.
No, AFAIK CEDET uses it's own wisent parser generator and its own
grammars.  And even if you get the syntax tree out of that parser, it's
a long way to do something sophisticated with it.
As I understand it CEDET has it's own wisent parser, but it can use
other parsers too. (I am cc:ing Eric so he can inform us.)
Post by Tassilo Horn
Eclim lets the editor do what it can do best -- editing text.  If it's
capable of issuing commands on the command line and receiving the
output, then it can use all of eclipse's intelligence.  I think this a
good deal.  Eclipse will never become a decent editor, and emacs has not
the resources to catch up when it comes to understanding and analyzing
java (and probably other languages such as Scala) source code.
Bye,
Tassilo
--
No person,  no idea, and no  religion deserves to be  illegal to insult,
not even the Church of Emacs. (Richard M. Stallman)
Eric M. Ludlam
2009-04-18 14:30:52 UTC
Permalink
Post by Lennart Borgman
Post by Tassilo Horn
Hi Lennart,
Post by Lennart Borgman
Post by Tassilo Horn
Post by Lennart Borgman
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim?
CEDET uses another approach.  It has it's own parsers and analyzers
which enable it to do smart autocompletion and other intelligent
stuff.  This works quite well for C/C++, because Eric has put a lot
of effort into it, and I highly appreciate that.
Maybe I am misunderstanding this, but I thought that CEDET is written
so that it can use external parsers etc.
No, AFAIK CEDET uses it's own wisent parser generator and its own
grammars.  And even if you get the syntax tree out of that parser, it's
a long way to do something sophisticated with it.
As I understand it CEDET has it's own wisent parser, but it can use
other parsers too. (I am cc:ing Eric so he can inform us.)
[ ... ]

CEDET does support many kinds of parsers. It has two internal
parsers, one of which is wisent. It has two regexp based parsers for
non-regular files like HTML. It also uses exuberent ctags to parse
about 10 other langauges (in CVS).

If there is some external program that can it run and parse files, then
CEDET can use it.

It is also not just parsers. If eclim has a tag database, it can use
that too, as the database backend is completely flexible. It already
supports GNU Global and a couple other things.

I'd be happy to help someone do an integration with an external parser
if desired.

Eric
--
Eric Ludlam: ***@siege-engine.com
Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net
Tassilo Horn
2009-04-18 18:40:39 UTC
Permalink
"Eric M. Ludlam" <***@siege-engine.com> writes:

Hi Eric,
Post by Eric M. Ludlam
Post by Lennart Borgman
Post by Tassilo Horn
No, AFAIK CEDET uses it's own wisent parser generator and its own
grammars.  And even if you get the syntax tree out of that parser,
it's a long way to do something sophisticated with it.
As I understand it CEDET has it's own wisent parser, but it can use
other parsers too. (I am cc:ing Eric so he can inform us.)
[ ... ]
CEDET does support many kinds of parsers. It has two internal
parsers, one of which is wisent. It has two regexp based parsers for
non-regular files like HTML. It also uses exuberent ctags to parse
about 10 other langauges (in CVS).
If there is some external program that can it run and parse files,
then CEDET can use it.
It is also not just parsers. If eclim has a tag database, it can use
that too, as the database backend is completely flexible. It already
supports GNU Global and a couple other things.
No, I don't think eclim (which means eclipse) uses some kind of tags
database. The JDT (Java Development Tools) come with their own
incremental compiler, and using eclim an editor (vim only, currently)
just ask it what the possible completions are at a given offset in a
file (completion is only one feature, basically it can use each and
every eclipse feature). See

http://eclim.sourceforge.net/

for details.

Bye,
Tassilo
--
Thousands of years ago Chuck Norris came across a bear. It was so
terrified that it fled north into the arctic. It was also so terrified
that all of its decendents now have white hair.
Nikolaj Schumacher
2009-04-18 21:00:03 UTC
Permalink
Post by Tassilo Horn
No, I don't think eclim (which means eclipse) uses some kind of tags
database.
Well, eclipse does keep a syntax tree of the source code. Eclim doesn't
necessarily make it available in a raw form, but it has (at least) a
command to print the class prototypes (java_class_prototype).

Looking at the source code it wouldn't be too hard to return methods,
arguments, etc. in CSV form. Somebody just would have to convince the
vim folks to accept patches helping an Emacs project. ;)


Either way, it's a very neat project. Thanks to whoever mentioned it
first. ;) The completion seems to work well with company[1], too, so
I'll include a back-end in the next version.



regards,
Nikolaj Schumacher

[1] http://nschum.de/src/emacs/company-mode/
Tassilo Horn
2009-04-18 22:06:12 UTC
Permalink
Nikolaj Schumacher <***@nschum.de> writes:

Hi Nikolaj,
Post by Nikolaj Schumacher
Well, eclipse does keep a syntax tree of the source code. Eclim
doesn't necessarily make it available in a raw form, but it has (at
least) a command to print the class prototypes (java_class_prototype).
Looking at the source code it wouldn't be too hard to return methods,
arguments, etc. in CSV form.
Doesn't it do that already? I only had a very brief look at the code,
but I had the impression that it basically returns every completion
possibility available at this position.
Post by Nikolaj Schumacher
Somebody just would have to convince the vim folks to accept patches
helping an Emacs project. ;)
I searched their mailing list, and it seems the word emacs was never
ever spoken out. ;-) But I'm pretty sure they would accept patches.
It's free software, so one could fork it anyway, and this would decrease
the benefits on every side.
Post by Nikolaj Schumacher
Either way, it's a very neat project. Thanks to whoever mentioned it
first. ;)
My pleasure!
Post by Nikolaj Schumacher
The completion seems to work well with company[1], too, so I'll
include a back-end in the next version.
Wow, that would be cool. Till now, I didn't have a deeper look at
company mode, but this would definitively make me try it.

Bye,
Tassilo
Nikolaj Schumacher
2009-04-19 12:18:50 UTC
Permalink
Post by Tassilo Horn
Post by Nikolaj Schumacher
Looking at the source code it wouldn't be too hard to return methods,
arguments, etc. in CSV form.
Doesn't it do that already? I only had a very brief look at the code,
but I had the impression that it basically returns every completion
possibility available at this position.
It returns pre-formatted completions. Semantic would need a tag list
with all classes, methods and argument names.
Post by Tassilo Horn
Post by Nikolaj Schumacher
The completion seems to work well with company[1], too, so I'll
include a back-end in the next version.
Wow, that would be cool. Till now, I didn't have a deeper look at
company mode, but this would definitively make me try it.
I've released it:
http://nschum.de/src/emacs/company-mode/

Unfortunately, completion requires saving the file. I haven't yet
figured out if eclim has a way around that.

For the time being, company can do it automatically, if
(setq company-eclim-auto-save t)

regards,
Nikolaj Schumacher
Tassilo Horn
2009-04-19 16:59:28 UTC
Permalink
Nikolaj Schumacher <***@nschum.de> writes:

Hi Nikolaj,
Post by Nikolaj Schumacher
Post by Tassilo Horn
Post by Nikolaj Schumacher
The completion seems to work well with company[1], too, so I'll
include a back-end in the next version.
Wow, that would be cool. Till now, I didn't have a deeper look at
company mode, but this would definitively make me try it.
http://nschum.de/src/emacs/company-mode/
Nice, currently I'm using 0.3.1 (that's the one my distro includes, but
I'm sure they'll updated it soon).
Post by Nikolaj Schumacher
Unfortunately, completion requires saving the file. I haven't yet
figured out if eclim has a way around that.
For the time being, company can do it automatically, if
(setq company-eclim-auto-save t)
I'll give it a test drive as soon as I find some time.

BTW, is it possible to checkout company-mode from your VCS somehow? I
really like it, and I'd like to write some new backends, for example for
slime.

Bye,
Tassilo
--
A man once claimed Chuck Norris kicked his ass twice, but it was
promptly dismissed as false - no one could survive it the first time.
Nikolaj Schumacher
2009-04-20 06:58:41 UTC
Permalink
Post by Tassilo Horn
BTW, is it possible to checkout company-mode from your VCS somehow? I
really like it, and I'd like to write some new backends, for example for
slime.
Then you might be interested in the slime back-end Ole Arndt wrote:

http://www.emacswiki.org/emacs-en/CompanyModeBackends


I plan to push the repository to github.com. I'll let you know when I do.

regards,
Nikolaj Schumacher
Tassilo Horn
2009-04-20 07:12:42 UTC
Permalink
Nikolaj Schumacher <***@nschum.de> writes:

Hi Nikolaj,
Post by Nikolaj Schumacher
Post by Tassilo Horn
BTW, is it possible to checkout company-mode from your VCS somehow?
I really like it, and I'd like to write some new backends, for
example for slime.
http://www.emacswiki.org/emacs-en/CompanyModeBackends
Great!
Post by Nikolaj Schumacher
I plan to push the repository to github.com. I'll let you know when I do.
Superb, thanks a lot.

Bye,
Tassilo
--
Windows: So easy to admin, even a worm can do it.
Tassilo Horn
2009-04-20 18:56:45 UTC
Permalink
Nikolaj Schumacher <***@nschum.de> writes:

Hi Nikolaj,
Post by Nikolaj Schumacher
Post by Tassilo Horn
Post by Nikolaj Schumacher
The completion seems to work well with company[1], too, so I'll
include a back-end in the next version.
Wow, that would be cool. Till now, I didn't have a deeper look at
company mode, but this would definitively make me try it.
http://nschum.de/src/emacs/company-mode/
And I have tested it. Really brilliant, you're my hero of the month!

The only thing that could be improved is that the error message could be
a bit more informative when eclim commands fail. I symlinked eclim and
eclimd to my bin dir, but that doesn't work, cause they assume they lay
in the eclipse plugin dir. This resulted in

--8<---------------cut here---------------start------------->8---
% eclim -command project_list
/home/horn/bin/eclim: line 30: /home/horn/bin/ng: No such file or directory--8<---------------cut here---------------end--------------->8---

and return code 127. You only check the non-zeroness of the return
code. In that case the eclim cmd output would be very helpful.
Post by Nikolaj Schumacher
Unfortunately, completion requires saving the file. I haven't yet
figured out if eclim has a way around that.
For the time being, company can do it automatically, if
(setq company-eclim-auto-save t)
Hm, here it's nil, but completion works perfectly without any saving.
(Eclim 1.4.5 and emacs 23 from yesterday).

Thanks a ton, again!
Tassilo
--
My opinions may have changed, but not the fact that I am right.
Nikolaj Schumacher
2009-04-22 06:04:11 UTC
Permalink
Post by Tassilo Horn
The only thing that could be improved is that the error message could be
a bit more informative when eclim commands fail.
You're right.
Post by Tassilo Horn
Post by Nikolaj Schumacher
For the time being, company can do it automatically, if
(setq company-eclim-auto-save t)
Hm, here it's nil, but completion works perfectly without any saving.
(Eclim 1.4.5 and emacs 23 from yesterday).
It will in the beginning. But Eclipse won't know about the new stuff
you added since the last save. It might also start completing the wrong
word, because the offset is incorrect.



regards,
Nikolaj Schumacher
Tassilo Horn
2009-04-22 06:54:03 UTC
Permalink
Nikolaj Schumacher <***@nschum.de> writes:

Hi Nikolaj,
Post by Nikolaj Schumacher
It will in the beginning. But Eclipse won't know about the new stuff
you added since the last save. It might also start completing the
wrong word, because the offset is incorrect.
Yes, in the meantime I've noticed that and set the auto save var
accordingly. Anyway, it's really very nice.

Because you've hacked that together sq quickly, did you find
documentation about the eclim command line tool, or did you check the
vim scripts? I searched the eclim homepage, but found only the commands
executable from within vim...

Bye,
Tassilo
--
The chief export of Chuck Norris is pain.
Nikolaj Schumacher
2009-04-22 18:08:07 UTC
Permalink
Post by Tassilo Horn
Because you've hacked that together sq quickly, did you find
documentation about the eclim command line tool, or did you check the
vim scripts? I searched the eclim homepage, but found only the commands
executable from within vim...
I couldn't find any real documentation, either, net even a --help.

But who needs docs when you've got the source code. ;)

src/java/org/eclim/plugin/jdt/PluginResources.java is a good starting
point. It lists all the commands and the classes implementing them.

regards,
Nikolaj Schumacher
Tassilo Horn
2009-04-22 18:32:43 UTC
Permalink
Nikolaj Schumacher <***@nschum.de> writes:

Hi!
Post by Nikolaj Schumacher
I couldn't find any real documentation, either, net even a --help.
But who needs docs when you've got the source code. ;)
src/java/org/eclim/plugin/jdt/PluginResources.java is a good starting
point. It lists all the commands and the classes implementing them.
Great, thanks for the pointer.

Tassilo
--
Richard Stallman's left and right hands are named "(" and ")"
Richard Riley
2009-04-20 20:00:43 UTC
Permalink
Post by Tassilo Horn
Hi Nikolaj,
Post by Nikolaj Schumacher
Post by Tassilo Horn
Post by Nikolaj Schumacher
The completion seems to work well with company[1], too, so I'll
include a back-end in the next version.
Wow, that would be cool. Till now, I didn't have a deeper look at
company mode, but this would definitively make me try it.
http://nschum.de/src/emacs/company-mode/
And I have tested it. Really brilliant, you're my hero of the month!
The only thing that could be improved is that the error message could be
a bit more informative when eclim commands fail. I symlinked eclim and
eclimd to my bin dir, but that doesn't work, cause they assume they lay
in the eclipse plugin dir. This resulted in
--8<---------------cut here---------------start------------->8---
% eclim -command project_list
/home/horn/bin/eclim: line 30: /home/horn/bin/ng: No such file or directory--8<---------------cut here---------------end--------------->8---
and return code 127. You only check the non-zeroness of the return
code. In that case the eclim cmd output would be very helpful.
Post by Nikolaj Schumacher
Unfortunately, completion requires saving the file. I haven't yet
figured out if eclim has a way around that.
For the time being, company can do it automatically, if
(setq company-eclim-auto-save t)
Hm, here it's nil, but completion works perfectly without any saving.
(Eclim 1.4.5 and emacs 23 from yesterday).
Thanks a ton, again!
Tassilo
You're saying that eclipse completion features now work in emacs with
company-mode? Wow? Is it trivial to set up? What about stuff like
refactoring? Is there an eclim interface for that? Or context API help?
Or are those outside of the remit of eclim?
Tassilo Horn
2009-04-21 17:24:02 UTC
Permalink
Richard Riley <***@googlemail.com> writes:

Hi Richard,
Post by Richard Riley
You're saying that eclipse completion features now work in emacs with
company-mode?
Exactly.
Post by Richard Riley
Wow? Is it trivial to set up?
Quite. Here's my config.

--8<---------------cut here---------------start------------->8---
(require 'company)
(define-key company-mode-map (kbd "M-SPC") 'company-complete)

(defun th-turn-on-company-mode ()
(interactive)
(company-mode 1))

(dolist (hook (list
'emacs-lisp-mode-hook
'lisp-mode-hook
'lisp-interaction-mode-hook
'clojure-mode-hook
'java-mode-hook
'haskell-mode-hook
'slime-repl-mode-hook
'sh-mode-hook))
(add-hook hook 'th-turn-on-company-mode))

(setq company-idle-delay nil
company-eclim-auto-save t)

(setq company-eclim-executable
"~/opt/eclipse/plugins/org.eclim_1.4.5/bin/eclim")

(defun th-java-mode-init ()
(setq company-backend 'company-eclim))

(add-hook 'java-mode-hook 'th-java-mode-init)
--8<---------------cut here---------------end--------------->8---

And you need to install eclim, of course. But it has an installer that
worked just fine for me.
Post by Richard Riley
What about stuff like refactoring? Is there an eclim interface for
that? Or context API help? Or are those outside of the remit of
eclim?
No, I think most if not all features are usable via eclim. For
refactoring I don't know, but at least the eclipse incremental compiler
can be used to highlight errors in the code. Same for any completion
functionality and things like "Organize imports".

That's all available for Vim right now, and I plan to start a project
which writes an emacs frontend. But my time is quite limited at the
moment, so I don't know exactly when I get a first version which
implements some first features. When I've done that, I'll announce it
and hope for many volunteers doing the work for me. ;-)

The git repo is already there:

http://repo.or.cz/w/eclim-emacs.git

Bye,
Tassilo
Chris McMahan
2009-04-28 20:33:40 UTC
Permalink
Post by Tassilo Horn
Hi Richard,
Post by Richard Riley
You're saying that eclipse completion features now work in emacs with
company-mode?
Exactly.
Post by Richard Riley
Wow? Is it trivial to set up?
Quite. Here's my config.
(require 'company)
(define-key company-mode-map (kbd "M-SPC") 'company-complete)
(defun th-turn-on-company-mode ()
(interactive)
(company-mode 1))
(dolist (hook (list
'emacs-lisp-mode-hook
'lisp-mode-hook
'lisp-interaction-mode-hook
'clojure-mode-hook
'java-mode-hook
'haskell-mode-hook
'slime-repl-mode-hook
'sh-mode-hook))
(add-hook hook 'th-turn-on-company-mode))
(setq company-idle-delay nil
company-eclim-auto-save t)
(setq company-eclim-executable
"~/opt/eclipse/plugins/org.eclim_1.4.5/bin/eclim")
(defun th-java-mode-init ()
(setq company-backend 'company-eclim))
(add-hook 'java-mode-hook 'th-java-mode-init)
And you need to install eclim, of course. But it has an installer that
worked just fine for me.
Post by Richard Riley
What about stuff like refactoring? Is there an eclim interface for
that? Or context API help? Or are those outside of the remit of
eclim?
No, I think most if not all features are usable via eclim. For
refactoring I don't know, but at least the eclipse incremental compiler
can be used to highlight errors in the code. Same for any completion
functionality and things like "Organize imports".
That's all available for Vim right now, and I plan to start a project
which writes an emacs frontend. But my time is quite limited at the
moment, so I don't know exactly when I get a first version which
implements some first features. When I've done that, I'll announce it
and hope for many volunteers doing the work for me. ;-)
http://repo.or.cz/w/eclim-emacs.git
Bye,
Tassilo
Thanks for the config, but I have had no luck getting it (or variations
of it) to work in Windows XP using Emacs 23. I've tried your config,
pointing the executable to

"c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.bat"
"c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.cmd"
"/cygdrivec/eclipse/plugins/org.eclim_1.4.5/bin/eclim.cmd"

and any other combination I can think of.

When I start the eclimd application
"c:/eclipse/eclimd.bat"
or
"c:/eclipse/eclimd.cmd"

it seems to start ok, and tells me it's listening on port 9091

... other output...

Debug options:
file:/C:/eclipse/.options not found
Time to load bundles: 63
Starting application: 14656
2009-04-28 16:30:34,218 INFO [org.eclim.eclipse.AbstractEclimApplication] Starting eclim...Application Started: 16562
2009-04-28 16:30:35,687 INFO [org.eclim.eclipse.AbstractEclimApplication] Loading eclim plugins...
2009-04-28 16:30:35,703 INFO [org.eclim.eclipse.AbstractEclimApplication] Loading plugin org.eclim.ant
2009-04-28 16:30:35,734 INFO [org.eclim.eclipse.AbstractEclimApplication] Loaded plugin org.eclim.ant_1.4.5.
2009-04-28 16:30:35,750 INFO [org.eclim.eclipse.AbstractEclimApplication] Loading plugin org.eclim.jdt
2009-04-28 16:30:37,062 WARN [org.eclim.plugin.jdt.PluginResources] Unable to locate jre src.zip.
2009-04-28 16:30:37,140 INFO [org.eclim.eclipse.AbstractEclimApplication] Loaded plugin org.eclim.jdt_1.4.5.
2009-04-28 16:30:37,156 INFO [org.eclim.eclipse.AbstractEclimApplication] Loading plugin org.eclim.maven
2009-04-28 16:30:37,171 INFO [org.eclim.eclipse.AbstractEclimApplication] Loaded plugin org.eclim.maven_1.4.5.
2009-04-28 16:30:37,203 INFO [org.eclim.eclipse.AbstractEclimApplication] Eclim Server Startedon port 9091.


But when I load the java file in emacs that I've set up inside eclipse,
I get no completions whatsoever. It's as if company is not even loaded.

I have verified that company works ok with elisp, and also the the
company-backend when editing java is set to "company-eclim",

I'm at a loss now on how to get this working on XP, but I would REALLY
like to see this functionality!

Has anyone else been able to get company and eclimd working on XP?

Thanks for a great package!!

- Chris McMahan
--
(. .)
=ooO=(_)=Ooo=====================================
Chris McMahan | ***@one.dot.net
=================================================
Tassilo Horn
2009-04-29 23:40:17 UTC
Permalink
Chris McMahan <***@one.net> writes:

Hi Chris,
Post by Chris McMahan
Thanks for the config, but I have had no luck getting it (or
variations of it) to work in Windows XP using Emacs 23. I've tried
your config, pointing the executable to
"c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.bat"
"c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.cmd"
"/cygdrivec/eclipse/plugins/org.eclim_1.4.5/bin/eclim.cmd"
and any other combination I can think of.
When I start the eclimd application
"c:/eclipse/eclimd.bat"
or
"c:/eclipse/eclimd.cmd"
it seems to start ok, and tells me it's listening on port 9091
Ok, so it seems the server part is up and running. What does

c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.bat -command project_list

in a cmd.exe return after starting eclimd. It should return a listing
of all projects in eclipse. (Or maybe you have to use the cmd file.)

Bye,
Tassilo

BTW: I'm probably not very helpful as I don't have neither a windows box
nor any clue how things work on windows [in the few cases where they do
work].
--
When Richard Stallman makes a sudo command, he loses permissions.
Chris McMahan
2009-05-01 02:58:59 UTC
Permalink
Post by Tassilo Horn
Hi Chris,
Post by Chris McMahan
Thanks for the config, but I have had no luck getting it (or
variations of it) to work in Windows XP using Emacs 23. I've tried
your config, pointing the executable to
"c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.bat"
"c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.cmd"
"/cygdrivec/eclipse/plugins/org.eclim_1.4.5/bin/eclim.cmd"
and any other combination I can think of.
When I start the eclimd application
"c:/eclipse/eclimd.bat"
or
"c:/eclipse/eclimd.cmd"
it seems to start ok, and tells me it's listening on port 9091
Ok, so it seems the server part is up and running. What does
c:/eclipse/plugins/org.eclim_1.4.5/bin/eclim.bat -command project_list
in a cmd.exe return after starting eclimd. It should return a listing
of all projects in eclipse. (Or maybe you have to use the cmd file.)
Bye,
Tassilo
BTW: I'm probably not very helpful as I don't have neither a windows box
nor any clue how things work on windows [in the few cases where they do
work].
c:\eclipse\plugins\org.eclimd_1.4.5\bin> eclim.bat -command project_name
HelloWorld - open - C:\Documents and Settings\mcmahan.cb\workspace\HelloWorld

Hmmm... I wonder if the spaces in my project directory are causing the
problem?

Oh well.... didn't seem to make a difference.

Thanks! I'll keep pursuing this and keep everyone updated.

- Chris
--
(. .)
=ooO=(_)=Ooo=====================================
Chris McMahan | ***@one.dot.net
=================================================
Richard Riley
2009-04-18 22:13:04 UTC
Permalink
Post by Tassilo Horn
Hi Nikolaj,
Post by Nikolaj Schumacher
Well, eclipse does keep a syntax tree of the source code. Eclim
doesn't necessarily make it available in a raw form, but it has (at
least) a command to print the class prototypes (java_class_prototype).
Looking at the source code it wouldn't be too hard to return methods,
arguments, etc. in CSV form.
Doesn't it do that already? I only had a very brief look at the code,
but I had the impression that it basically returns every completion
possibility available at this position.
Post by Nikolaj Schumacher
Somebody just would have to convince the vim folks to accept patches
helping an Emacs project. ;)
I searched their mailing list, and it seems the word emacs was never
ever spoken out. ;-) But I'm pretty sure they would accept patches.
It's free software, so one could fork it anyway, and this would decrease
the benefits on every side.
Post by Nikolaj Schumacher
Either way, it's a very neat project. Thanks to whoever mentioned it
first. ;)
My pleasure!
Post by Nikolaj Schumacher
The completion seems to work well with company[1], too, so I'll
include a back-end in the next version.
Wow, that would be cool. Till now, I didn't have a deeper look at
company mode, but this would definitively make me try it.
Bye,
Tassilo
I wonder where company mode and autocomplete out do each other in some
areas and reinvent the wheel in others. Company mode seems to provide
better select information e.g elisp info for candidates.
Eric M. Ludlam
2009-04-18 22:44:14 UTC
Permalink
Post by Nikolaj Schumacher
Post by Tassilo Horn
No, I don't think eclim (which means eclipse) uses some kind of tags
database.
Well, eclipse does keep a syntax tree of the source code. Eclim doesn't
necessarily make it available in a raw form, but it has (at least) a
command to print the class prototypes (java_class_prototype).
Looking at the source code it wouldn't be too hard to return methods,
arguments, etc. in CSV form. Somebody just would have to convince the
vim folks to accept patches helping an Emacs project. ;)
Either way, it's a very neat project. Thanks to whoever mentioned it
first. ;) The completion seems to work well with company[1], too, so
I'll include a back-end in the next version.
[ ... ]


Company mode supports the CEDET completion engine also. If someone is
going to find out how to make eclim work w/ Emacs, doing so with CEDET
would help company mode, plus several other tools that use CEDET as a
back-end. I don't know anything about how eclipse works, but I'd be
happy to help someone figure out the CEDET angle.

Eric
--
Eric Ludlam: ***@siege-engine.com
Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net
Richard Riley
2009-04-18 14:25:49 UTC
Permalink
Post by Tassilo Horn
Hi Lennart,
Post by Lennart Borgman
Post by Tassilo Horn
I hope someone starts writing an emacs interface to Eclim [1] anytime
soon.  I had a quick look at the sources and it shouldn't be too
hard, but it's quite a lot to do (to get all eclipse features).
To me it seems that most java programmers use eclipse (or netbeans)
anyway or switched to eclipse/NB, and there's noone feels preasured
to enhance emacs in that direction.  And you can count me as one of
those, sadly.  But I'm pretty sure that if someone would create an
emacs interface to let's say only the autocompletion feature of
eclipse using eclim, things would get running on their own.
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim?
CEDET uses another approach. It has it's own parsers and analyzers
which enable it to do smart autocompletion and other intelligent stuff.
This works quite well for C/C++, because Eric has put a lot of effort
into it, and I highly appreciate that.
The eclim approach is very different. Here an headless eclipse instance
runs as a server in the background. Vim does no intelligent source code
I'm in project Foo in file src/bar/Baz.java on position 18271 and now
I executed the completion command. Gimme the completion list,
please.
And so does eclipse. Here the editors task is only to issue commands,
let eclipse do the intelligent stuff, get back the results, and display
it. Very simple.
IMO this is a great approach, because speaking honestly: Emacs cannot
compete with eclipse for java (and probably other new, nifty languages
like scala or groovy). They have far more developers and academia as
well as industry are focused on it.
Anyway, no reason for sadness, the functionality is there ready for
consumption. So instead of reinventing the wheel, we should combine
emacs' unsurpassed editing capabilities (eclipse extremely sucks in that
respect) with eclipse's intelligent features where those are better than
the emacs counterparts.
Bye,
Tassilo
Interesting. Thanks for the info. I used eclipse for a while but it
makes emacs look like a lightweight speedster :-; Java. Yuck :-;
Richard Riley
2009-04-18 14:23:50 UTC
Permalink
Post by Lennart Borgman
Post by Tassilo Horn
Hi Richard,
Post by Richard Riley
Post by Martin
http://dir.gmane.org/search.php?match=jdee
I'm wondering what that offers over the mailing list? It seems pretty
dead. In fact it is the mailing list isn't it?
Yep, it is.
I hope someone starts writing an emacs interface to Eclim [1] anytime
soon.  I had a quick look at the sources and it shouldn't be too hard,
but it's quite a lot to do (to get all eclipse features).
To me it seems that most java programmers use eclipse (or netbeans)
anyway or switched to eclipse/NB, and there's noone feels preasured to
enhance emacs in that direction.  And you can count me as one of those,
sadly.  But I'm pretty sure that if someone would create an emacs
interface to let's say only the autocompletion feature of eclipse using
eclim, things would get running on their own.
There has been very much done to CEDET now. Would it not be a good
idea to use CEDET for an interface to eclim? Why not mention the
possibility on the cedet dev list?
I can second that. I use a autocomplete with cedet and it works nicely.


http://xtalk.msk.su/~ott/en/writings/emacs-devenv/EmacsCedet.html
http://richardriley.net/projects/emacs/dotprogramming
e***@gmail.com
2009-04-17 17:19:20 UTC
Permalink
Post by Martin
[...] I subscribed to the jdee-users mailing list and
posted about my problem.  After a few days without an answer, I mailed
the package maintainer directly.  It's been two weeks now, and I
haven't gotten any response, nor have I seen any traffic at all on the
jdee-users list.  Does anyone still use it anymore?  If not, what
other options for Java development on Emacs are there?
http://dir.gmane.org/search.php?match=jdee
Yeah... I looked over the archives, and the last thread was in
January, the one before that was last October, and the one before
*that* was in March of last year, thirteen months ago.

Is that all the interest JDEE has now?
Tim X
2009-04-18 01:15:06 UTC
Permalink
Post by e***@gmail.com
Post by Martin
[...] I subscribed to the jdee-users mailing list and
posted about my problem.  After a few days without an answer, I mailed
the package maintainer directly.  It's been two weeks now, and I
haven't gotten any response, nor have I seen any traffic at all on the
jdee-users list.  Does anyone still use it anymore?  If not, what
other options for Java development on Emacs are there?
http://dir.gmane.org/search.php?match=jdee
Yeah... I looked over the archives, and the last thread was in
January, the one before that was last October, and the one before
*that* was in March of last year, thirteen months ago.
Is that all the interest JDEE has now?
I think you may need to be a bit careful judging things from how much is
posted. I've noticed a growing trend in evaluating packages by how
active their community is. This is at one level quite reasonable as it
shows how much interest there is in the project. However, it also has a
negative aspect. If a package/project has reached its targetted
objectives, particularly the objectives of the person who started the
project or is responsible for its maintenance and it is now in a stable
state, it may not be unreasonable to see little in the way of traffic on
the project it mailing lists/forums.

I've got packages I've been running for nearly 10 years that have not
seen any significant updates at all. The packages could be improved, but
they essentially satisfy the requirements they were implemented to solve
and the improvements are just minor tweaks.

Looking at traffic and guaging interest in a project will give you an
indication of how easily you may get assistance if required, but it may
not give you any real picture of the state of the package. The only real
way to do this is to install it and try it out. You may find that it
meets 80% of what your looking for and you can survive without the other
20% (or maybe over time you can add that missing 20%).

I do suspect interest in JDEE has declined since eclipse has become the
standard for java development. When JDEE was first implemented there
really wasn't anything out there that was any good and JDE provided a
really good java IDE. This is often how things go. Emacs, being as
extensible as it is, is often the first kid on the block to provide good
support for a new technology. However, over time, other solutions, which
are usually less extensible, but more targetted to a specific technology
come into existence. Often these new dedicated solutions borrow ideas
from the emacs solution, which to some extent can be viewed as a
prototype.

HTH

Tim
--
tcross (at) rapttech dot com dot au
Loading...