Posted 24 February 2010 - 09:12 AM
OK here are a couple of more useful Eclipsisms
Source | generate Setters Getters
Personally I have rarely used the drop down hint to correct a warning Generate Setters and Getters... , I much more often use the Source | Generate Setters/Getters...
in the menus.
Tony mentioned this one, but only after showing the completion hint several times, so I wanted to draw attention to the tool/wizard variation instead of just following warnings and correcting them.
Move Lines: CTRL-Up and CTRL-Down
Tony seemed to be a fan of cut and paste which is certainly what we all do, but there is another useful Eclipse set of keys.
When you just didn't bother to answer the question where to insert some code in some wizard (I know I often don't), or you find you need to move a block of code. Try
1. select the block of code
2. Use CTRL-UpArrow and CTRL-DownArrow to move it.
I never use drag and drop of text, but I use this move up and move down feature all the time.
Interestingly, it even re-indents for you (assuming you've set what you want in your preferences).
HTH,
-Paul