From 9b96bc009a5e4602ab673056f2448bc82fcd1602 Mon Sep 17 00:00:00 2001 From: Andrey Starovoyt Date: Tue, 27 May 2014 17:46:09 +0400 Subject: [PATCH] common style for expressions --- .../postfix/templates/AssertStatementPostfixTemplate.java | 2 +- .../template/postfix/templates/FormatPostfixTemplate.java | 2 +- .../postfix/templates/IntroduceFieldPostfixTemplate.java | 2 +- .../postfix/templates/IntroduceVariablePostfixTemplate.java | 2 +- .../postfix/templates/ReturnStatementPostfixTemplate.java | 2 +- .../template/postfix/templates/SoutPostfixTemplate.java | 2 +- .../postfix/templates/ThrowExceptionPostfixTemplate.java | 2 +- .../template/postfix/templates/TryStatementPostfixTemplate.java | 2 +- .../postfix/templates/TryWithResourcesPostfixTemplate.java | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/AssertStatementPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/AssertStatementPostfixTemplate.java index 90812945f7e6..7cd95f973766 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/AssertStatementPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/AssertStatementPostfixTemplate.java @@ -23,7 +23,7 @@ import static com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplate public class AssertStatementPostfixTemplate extends JavaStatementWrapPostfixTemplate { public AssertStatementPostfixTemplate() { - super("assert", "assert expr;", JAVA_PSI_INFO, IS_BOOLEAN); + super("assert", "assert expr", JAVA_PSI_INFO, IS_BOOLEAN); } @NotNull diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplate.java index f312d44d1d7c..37df2b611a5f 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/FormatPostfixTemplate.java @@ -39,7 +39,7 @@ public class FormatPostfixTemplate extends JavaStatementWrapPostfixTemplate { public FormatPostfixTemplate() { - super("format", "String.format(expr);", JAVA_PSI_INFO, IS_STRING); + super("format", "String.format(expr)", JAVA_PSI_INFO, IS_STRING); } @Override diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceFieldPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceFieldPostfixTemplate.java index 7d0547205cfe..40da7fd94b88 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceFieldPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceFieldPostfixTemplate.java @@ -25,7 +25,7 @@ import org.jetbrains.annotations.NotNull; public class IntroduceFieldPostfixTemplate extends JavaPostfixTemplateWithChooser { public IntroduceFieldPostfixTemplate() { - super("field", "myField = expr;"); + super("field", "myField = expr"); } @Override diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceVariablePostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceVariablePostfixTemplate.java index bde745a01261..57c03f9501fa 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceVariablePostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/IntroduceVariablePostfixTemplate.java @@ -31,7 +31,7 @@ import org.jetbrains.annotations.NotNull; // todo: support for int[].var (parses as .class access!) public class IntroduceVariablePostfixTemplate extends JavaPostfixTemplateWithChooser { public IntroduceVariablePostfixTemplate() { - super("var", "T name = expr;"); + super("var", "T name = expr"); } @Override diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ReturnStatementPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ReturnStatementPostfixTemplate.java index 4f60680e788e..e82574224328 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ReturnStatementPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ReturnStatementPostfixTemplate.java @@ -22,7 +22,7 @@ import static com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplate public class ReturnStatementPostfixTemplate extends JavaStatementWrapPostfixTemplate { public ReturnStatementPostfixTemplate() { - super("return", "return expr;", JAVA_PSI_INFO, IS_NON_VOID); + super("return", "return expr", JAVA_PSI_INFO, IS_NON_VOID); } @NotNull diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplate.java index 149141840f5f..7f10a114daf1 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/SoutPostfixTemplate.java @@ -22,7 +22,7 @@ import static com.intellij.codeInsight.template.postfix.util.JavaPostfixTemplate public class SoutPostfixTemplate extends JavaStatementWrapPostfixTemplate { public SoutPostfixTemplate() { - super("sout", "System.out.println(expr);", JAVA_PSI_INFO, IS_NON_VOID); + super("sout", "System.out.println(expr)", JAVA_PSI_INFO, IS_NON_VOID); } @NotNull diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ThrowExceptionPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ThrowExceptionPostfixTemplate.java index b8dbd640d246..987cd86513b2 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ThrowExceptionPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/ThrowExceptionPostfixTemplate.java @@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull; public class ThrowExceptionPostfixTemplate extends JavaStatementWrapPostfixTemplate { public ThrowExceptionPostfixTemplate() { - super("throw", "throw expr;", JavaPostfixTemplatesUtils.JAVA_PSI_INFO, JavaPostfixTemplatesUtils.IS_THROWABLE); + super("throw", "throw expr", JavaPostfixTemplatesUtils.JAVA_PSI_INFO, JavaPostfixTemplatesUtils.IS_THROWABLE); } @NotNull diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryStatementPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryStatementPostfixTemplate.java index 0c58e42e7430..71d181890383 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryStatementPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryStatementPostfixTemplate.java @@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull; public class TryStatementPostfixTemplate extends PostfixTemplate { protected TryStatementPostfixTemplate() { - super("try", "try { exp } catch(Ex e) { e.printStackTrace(); }"); + super("try", "try { exp } catch(Exception e)"); } @Override diff --git a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryWithResourcesPostfixTemplate.java b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryWithResourcesPostfixTemplate.java index b112eecc0457..3b2ffe5a6832 100644 --- a/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryWithResourcesPostfixTemplate.java +++ b/java/java-impl/src/com/intellij/codeInsight/template/postfix/templates/TryWithResourcesPostfixTemplate.java @@ -38,7 +38,7 @@ import java.util.Collections; public class TryWithResourcesPostfixTemplate extends PostfixTemplate { protected TryWithResourcesPostfixTemplate() { - super("twr", "try(Type f = new Type()) {} catch (Ex e) {}"); + super("twr", "try(Type f = new Type()) catch (Exception e)"); } @Override