After spending the last couple days in an Eclipse Developers course, a friend asked me what the advantages were to using Eclipse as an IDE over something like Emacs for writing Java. Prior to switching to using Eclipse, I’d primarily used Emacs with the JDEE and was pretty happy. But here are a few reasons I switched:
- Refactoring - Simply great refactoring support for all sorts of common operations like rename, move, override baseclass methods, and my recent favorite "Generate Delegate Methods" which saves a lot of typing.
- Content Assist - Including but not limited to code completion, it just works smoothly. Half of what I type now is Ctrl-Space to complete the class/method/field/template name that I'm writing. I never type
importstatements anymore, and if you do it will help you complete those too. There are other editor goodies as well, like easily diving into method bodies, having compile errors take you straight to the offending line and countless others.
- Compile-as-you-type - This one is tough to truly appreciate until you use it. It takes the guess work out of whether your code will compile, since the built-in compiler transparently checks for you each step of the way. Forget a semicolon and you know right away. Combined with the handy quickfixes, a whole category of stupid bugs can be eliminated. And when you want to test your app, the code is always compiled and ready to go.
- SWT/Native look & feel- I'd tried other Java IDEs and found most to be slow and have a second-class feel to them. Eclipse on Windows, feels like Windows and on Linux looks like GTK. Perhaps Swing is to blame for other's problems, but none of them struck me the way Eclipse did. It just looks better (and it helps that it actually is).
- Plug-in Development Environment (PDE) - If you are building a plugin or application on top of Eclipse, it's the only way to go. Provides a lot help in constructing, testing and deploying your code. And with the ever-growing services provided by the platform, including the exciting Rich Client Platform work, there a lot of reasons to consider it.
- Better Debugger - I just flat-out like a visual debugger better than using jdb. It's one of those things that I find really useful to have a graphical representation of, like diff/merge tools. This one is well-integrated with the product, supports hot-swapping code, remote debugging and other helpful features.
- Growing community - Eclipse has spread like wildfire and has a huge community of users, developers, and corporate backers (even without Sun). And from its various members comes a huge number of plugins (free and commerical), articles & books, courses, conferences and an even a programming competition. Lots of new features in 3.0, including a solid visual designer for SWT and Swing.
- Equivalence with Emacs - Emacs will always be my first real love with a text editor: oh, the staying up to learn Elisp, hacking my own functions and menus, arguing over Emacs vs. XEmacs! And I still use it, just not for Java. Because Eclipse is free, open-source and cross-platform. </ul> In the end, I can't say if or how much more productive it makes me. But there are so many powerful capabilities close at hand that it feels like my job is easier and not spent as much tripping over my development environment.