使用快捷方式和自动完成在Intellij IDEA中创建新对象的最佳方法是什么? [英] What's the best way to use shortcuts and autocomplete to create a new object in Intellij IDEA?
本文介绍了使用快捷方式和自动完成在Intellij IDEA中创建新对象的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对象
+ 快捷方式
➜对象对象=新对象();
是否有这样的快捷方式?
Whether there is such shortcut?
推荐答案
new Obj
, Tab 完成 new Object()
, Ctrl + Alt + V ( Refactor
| 介绍变量):
new Obj
, Tab to complete to new Object()
, Ctrl+Alt+V (Refactor
| Introduce Variable):
Object o = new Object();
如果需要更改名称,然后按 Enter 进行确认。
Change name if needed and press Enter to confirm.
有关使用实时模板功能的更方便的解决方案,请查看下面的答案来自 @MarcG 。
For the more convenient solution utilizing the live templates feature please check the answer below from @MarcG.
这篇关于使用快捷方式和自动完成在Intellij IDEA中创建新对象的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文