Reputation: 8655
There is an useful functionality in IDEA that lets you create a field, and it appears in the little light-bulb when you highlight the non-created variable.
However, I can't find the short-cut, searched for "create field" in the settings but no luck.
Anyone knows?.
Upvotes: 2
Views: 3616
Reputation: 100
On MacOS, its option-command+F.
Its much faster than Option-Enter, then you need some brain cycle to select create field in the down down menu
Upvotes: 1
Reputation: 97148
Use Alt-Enter to access the lightbulb menu and then use the arrow keys to select the necessary option. There is no possibility to assign shortcuts to individual quickfixes (there are too many of them).
Upvotes: 3
Reputation: 5777
Control + Alt + F on a literal will give you the option to extract the value into a field.
Upvotes: 7