Addded "iter" postfix template working like "for" one to be consistent with live templates

This commit is contained in:
Yaroslav Lepenkin
2015-08-11 14:39:12 +03:00
parent af74f9fc20
commit a7d1e0d33a
2 changed files with 4 additions and 3 deletions
@@ -28,8 +28,8 @@ import static com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplate
import static com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplatesUtils.selectorTopmost;
public class ForeachPostfixTemplate extends StringBasedPostfixTemplate {
public ForeachPostfixTemplate() {
super("for", "for (T item : expr)", selectorTopmost(IS_ITERABLE_OR_ARRAY));
public ForeachPostfixTemplate(String name) {
super(name, "for (T item : expr)", selectorTopmost(IS_ITERABLE_OR_ARRAY));
}
@Override
@@ -42,7 +42,8 @@ public class JavaPostfixTemplateProvider implements PostfixTemplateProvider {
new ElseStatementPostfixTemplate(),
new ForAscendingPostfixTemplate(),
new ForDescendingPostfixTemplate(),
new ForeachPostfixTemplate(),
new ForeachPostfixTemplate("iter"),
new ForeachPostfixTemplate("for"),
new FormatPostfixTemplate(),
new IfStatementPostfixTemplate(),
new InstanceofExpressionPostfixTemplate(),