Having programmed through emacs and vi for years and years at this point, I have heard that using an IDE is a very good way of becoming more efficient.
To that end, I have decided to try using Eclipse for a lot of coding and seeing how I get on.
Are there any suggestions for easing the transition over to an IDE. Obviously, some will think none of this is worth the bother, but I think with Eclipse allowing emacs-style key bindings and having code completion and in-built debugging, I reckon it is well worth trying to move over to a more feature-rich environment for the bulk of my development worth.
So what suggestions do you have for easing the transition?
Eclipse is the best IDE I’ve used, even considering its quite large footprint and sluggishness on slow computers (like my work machine… Pentium III!).
Rather than trying to ‘ease the transition’, I think it’s better to jump right in and let yourself be overwhelmed by the bells and whistles and truly useful refactorings etc.
Here are some of the most useful things I would consciously use as soon as possible:
The ‘Quick fix’ tool, which has a large amount of context-sensitive refactorings and such. Some examples:
If you put the text cursor on the argument to parse(…) and press ctrl+1, Eclipse will suggest ‘Inline local variable’. If you do that, then repeat with the cursor over the return variable ‘response’, the end result will be:
There are many, many little rules like this which the quick fix tool will suggest and apply to help refactor your code (including the exact opposite, ‘extract to local variable/field/constant’, which can be invaluable). You can write code that calls a method you haven’t written yet – going to the line which now displays an error and using quick fix will offer to create a method matching the parameters inferred from your usage. Similarly so for variables. All these small refactorings and shortcuts save a lot of time and are much more quickly picked up than you’d expect. Whenever you’re about to rearrange code, experiment with quick fix to see if it suggests something useful.
There’s also a nice bag of tricks directly available in the menus, like generating getters/setters, extracting interfaces and the like. Jump in and try everything out!