i18n: enable batch fix for kotlin
authorAnna.Kozlova <anna.kozlova@jetbrains.com>
Fri, 17 Jan 2020 07:42:46 +0000 (08:42 +0100)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Fri, 17 Jan 2020 08:06:46 +0000 (08:06 +0000)
GitOrigin-RevId: be4064f3dd6cf9eeae6f5ecc158c1ad30e127bec

plugins/java-i18n/src/com/intellij/codeInspection/i18n/I18nInspection.java

index 0c8a419e2c5cae5e25153e47b855ef8a4b38ba96..6b851cea4f5d8e968f27cb5aa7c8ed2d19e84479 100644 (file)
@@ -545,8 +545,8 @@ public class I18nInspection extends AbstractBaseUastLocalInspectionTool implemen
         
         List<LocalQuickFix> fixes = new ArrayList<>();
 
         
         List<LocalQuickFix> fixes = new ArrayList<>();
 
-        if (sourcePsi instanceof PsiLiteralExpression) {
-          if (myOnTheFly) {
+        if (myOnTheFly) {
+          if (sourcePsi instanceof PsiLiteralExpression) {
             if (I18nizeConcatenationQuickFix.getEnclosingLiteralConcatenation(sourcePsi) != null) {
               fixes.add(new I18nizeConcatenationQuickFix());
             }
             if (I18nizeConcatenationQuickFix.getEnclosingLiteralConcatenation(sourcePsi) != null) {
               fixes.add(new I18nizeConcatenationQuickFix());
             }
@@ -568,10 +568,10 @@ public class I18nInspection extends AbstractBaseUastLocalInspectionTool implemen
               }
             }
           }
               }
             }
           }
-          else if (Registry.is("i18n.for.idea.project") &&
-                   I18nizeConcatenationQuickFix.getEnclosingLiteralConcatenation(sourcePsi) == null) {
-            fixes.add(new I18nizeBatchQuickFix());
-          }
+        }
+        else if (Registry.is("i18n.for.idea.project") &&
+                 I18nizeConcatenationQuickFix.getEnclosingLiteralConcatenation(sourcePsi) == null) {
+          fixes.add(new I18nizeBatchQuickFix());
         }
 
         LocalQuickFix[] farr = fixes.toArray(LocalQuickFix.EMPTY_ARRAY);
         }
 
         LocalQuickFix[] farr = fixes.toArray(LocalQuickFix.EMPTY_ARRAY);