如何在eclipse中为java代码添加快捷键 [英] How to add shortcut keys for java code in eclipse
本文介绍了如何在eclipse中为java代码添加快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
该功能在Eclipse中称为代码模板。您可以使用Preferences-> Java-> Editor-> Templates添加模板。两篇好文章:
- http://eclipse.dzone.com/news/effective-eclipse-dont-write-c
- http://eclipse.dzone.com/news/effective-eclipse-custom-templ
此外,这个SO问题:
System.out.println()
已经映射到 sysout
,所以您可以先学习一些现有的模板来节省时间。
Say I type "sout", the intellisense should expand it to "System.out.println()". Is there a way to adding such templates?
解决方案
The feature is called "code templates" in Eclipse. You can add templates with Preferences->Java->Editor->Templates. Two good articles:
- http://eclipse.dzone.com/news/effective-eclipse-dont-write-c
- http://eclipse.dzone.com/news/effective-eclipse-custom-templ
Also, this SO question:
System.out.println()
is already mapped to sysout
, so you may save time by learning a few of the existing templates first.
这篇关于如何在eclipse中为java代码添加快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文