Is there a key shortcut in Eclipse to copy the whole body of a method to a buffer?

Is there a key shortcut in Eclipse for copying the whole method body to the buffer?

+5
source share
4 answers

A little trick using the bend function :

If the method is complex, and if you select a minimized line, you will actually copy the full body of the specified method.

http://img210.i_mageshack.us/img210/7209/eclipsecopymethod.png

If Alt+ Shift+ Updoes not work for a large number of lines, it will be.

+7
source

You can find the 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 item. This may be what you are looking for.

+8

You can press alt+ shift+ upseveral times (5-10 if you start with an empty selection) times to expand the selection to include the entire method object.

+4
source

If you just want to copy a block of code (including the body of the method), double-click to the right of the first curly brace, the whole block will become highlighted, then this is just a Control-C, Control-V :) element

0
source

All Articles