在 Eclipse 中插入 Java 'for' 循环的快速方法
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18771545/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Quick way to insert the Java 'for' loop in Eclipse
提问by ps-aux
Is there a (quick) way to automatically insert the Java for
loop, for example, for (int i=0;i< someInt;i++){
?
是否有(快速)方法来自动插入 Javafor
循环,例如,for (int i=0;i< someInt;i++){
?
It would be very convenient (as rest of code generation functionality).
这将非常方便(作为代码生成功能的其余部分)。
采纳答案by Jigar Joshi
Type for
and then hit Ctrl+ Space.
输入for
然后点击Ctrl+ Space。
回答by zbess
You can also use the Fast Codeplugin or define your own template similar to IntelliJ IDEA.
您还可以使用Fast Code插件或定义您自己的类似于IntelliJ IDEA的模板。
Someone has already posted some templates here.
有人已经在这里发布了一些模板。