简体   繁体   English

Intellij IDEA“创建字段”的快捷方式?

[英]Intellij IDEA shortcut to “create field”?

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. IDEA中有一个有用的功能,可让您创建一个字段,当您突出显示未创建的变量时,它会出现在小灯泡中。

However, I can't find the short-cut, searched for "create field" in the settings but no luck. 但是,我找不到快捷方式,在设置中搜索了“创建字段”,但是没有运气。

Anyone knows?. 有谁知道?。

文字上的Control + Alt + F将使您可以选择将值提取到字段中。

Use Alt-Enter to access the lightbulb menu and then use the arrow keys to select the necessary option. 使用Alt-Enter访问灯泡菜单,然后使用箭头键选择必要的选项。 There is no possibility to assign shortcuts to individual quickfixes (there are too many of them). 无法将快捷方式分配给各个快速修复程序(它们太多了)。

On MacOS, its option-command+F . 在MacOS上,其option-command + F。

Its much faster than Option-Enter, then you need some brain cycle to select create field in the down down menu 它的速度比Option-Enter快得多,因此您需要一些大脑循环才能在下拉菜单中选择创建字段

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM