intellij-idea Refactoring


Example

Copy

F5

Move

F6

Safe delete

Windows / Linux: Alt + Delete

OS X / macOS: Cmd + Delete

Note that the Delete key on OS X / macOS is the equivalent of the Backspace key on other operating systems.

Rename

Shift+ F6

Extract Method

Windows / Linux: Ctrl + Alt + M

OS X / macOS: Cmd + Option + M

Extract Field

Windows / Linux: Ctrl + Alt + F

OS X / macOS: Cmd + Option + F

Extract Variable

Windows / Linux: Ctrl + Alt + V

OS X / macOS: Cmd + Option + V

Extract Constant

Windows / Linux: Ctrl + Alt + C

OS X / macOS: Cmd + Option + C

Extract Parameter

Windows / Linux: Ctrl + Alt + P

OS X / macOS: Cmd + Option + P