diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ForeachPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ForeachPostfixTemplate.java index 72404efa582f..7daeb5e3e1ca 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ForeachPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ForeachPostfixTemplate.java @@ -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 diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/JavaPostfixTemplateProvider.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/JavaPostfixTemplateProvider.java index 7f21ad2bfcca..dbfe90d7a27f 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/JavaPostfixTemplateProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/JavaPostfixTemplateProvider.java @@ -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(),