Until IDEA gets a built-in function like this, you can use this approach (pretty quickly):
- Place the caret on the method name bar or somewhere inside the method itself
- Ctrl + Minus
- Ctrl + D
- Ctrl + Plus
Or create a macro like @CrazyCoder.
source share