什么是不同的eclipse快捷方式可用? [英] What are the different eclipse shortcuts available?
问题描述
我想知道不同的eclipse快捷方式,当我们想写这个
I wanted to know the different eclipse shortcuts available like when we wanted to write this
System.out.println();
然后我们只需编写 syso
并点击 ctrl + space
然后我们得到System。 out.println();我不想要快捷键,如复制ctrl + c或剪切ctrl + X
System.out.println();
then we simply write syso
and hit ctrl+space
then we get System.out.println();.I do not want shortcuts like for copy ctrl+c or to cut ctrl +X
模板的屏幕截图
推荐答案
这些被称为编辑器模板,您可以在
These are called "editor templates", and you can see the full list in
Window --> Preferences --> Java --> Editor --> Templates
您还可以创建自己的那些,具有各种占位符,例如我有一个 isequalto
定义如下:
You can also create your own there, with various placeholders, e.g. I have one isequalto
defined like this:
${:importStatic(org.fest.assertions.api.Assertions.assertThat)}assertThat(${actual}).isEqualTo(${expected});
这将自动添加静态导入并添加可以使用TAB导航的光标位置。这可以通过键入 isequalto
(或只是 ise
)和ctrl + SPACE。
This will automatically add a static import and add cursor positions that can be navigated to with TAB. This can be invoked by typing isequalto
(or just ise
) and ctrl+SPACE.
对于一个try / catch块,只需键入 try
和ctrl + SPACE。
For a try/catch bock, just type try
and ctrl+SPACE.
这篇关于什么是不同的eclipse快捷方式可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!