First of all, I think Eclipse is a great IDE. There are a ton of features that work really well in Eclipse: intellisense, auto-compilation, and hotswap debugging. It handles your project and classpath pretty well too… But the more I get used to Emacs the less I can stand typing in an non-Emacs setup. Eclipse even has key binding support for Emacs mode, but it’s just not the same. Plus, it occupies a tremendous amount of real-estate as seen below.
So I’m trying Java within Emacs with JDEE. At the moment, I can’t get it to be an Eclipse replacement and I’m not sure it supports completions like Eclipse does. But when I started typing I forgot I had auto-complete mode on! While it may not know the scope of a class, it saves a lot of time with quick tab completion of long Java variable and class names. Intellisense and auto-complete mode are two different tools, but I’m starting to think I’d rather have the auto-complete over Intellisense. Also, as I’ve been using YASnippet more and more, I can quickly add custom snippets to expand code. Eclipse does have some of this, namely a nice
try / catch like snippet. But imagine being able to have that code expansion on anything you wanted… that’s YASnippet!
But to get it to work with Emacs 24, there is some annoying configuration. I found an obscure forum post that details the instructions, which seem to get JDEE up and running. After some manual project configuration by customizing some variables as outlined in the user’s guide, I was able to get my project built and running. Yeah yeah, Eclipse automatically handles the classpath variable, I know.
Honestly, this is a lot of pain to go through and I don’t recommend it unless you are already an Emacs user. But, once one does get it finally working, I think the benefits of staying in Emacs outweigh the context switch of using Eclipse. At least for small projects. For large projects with complex dependencies and a complicated build process, I’m not sure about JDEE, but for small projects, like this Othello game AI I’m working on, it’s fine.
So this weekend I’ll be improving my Othello AI and studying for my AI midterm. (All things I should be doing instead of trying to get Emacs to work well with Java… 🙂 )