tags:

views:

53

answers:

3

is there a key shortcut in Eclipse to copy the whole method body into buffer?

+3  A: 

You can find a list of shortcuts in Eclipse by typing Ctrl+Shift+L.

While you are exploring this list, you will find Alt+Shift+Right which selects the next element. This may be what you are looking for.

MatthieuF
Any reason for the downvote here?
MatthieuF
@MatthieuF Very helpful, thank you.
EugeneP
+2  A: 

You can press alt+shift+up several (5-10 if you start from empty selection) times to expand selection to include the whole method body.

Ha
Well that's well known ;) If your method body contains > 100 lines it gets difficult.
EugeneP
+2  A: 

Little know trick: use the folding feature:

If a method is folded, and if you select the folded line, you will actually copy the full body of said method.

alt text

if the Alt+Shift+Up does not work for large number of lines, this will.

VonC