@Override
    protected void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) {
      if (!(element instanceof PsiTemplateExpression templateExpression)) return;
      PsiLiteralExpression literal = templateExpression.getLiteralExpression();
      if (literal != null) {
        templateExpression.replace(literal);
        return;
      }
      PsiTemplate template = templateExpression.getTemplate();
      if (template == null) return;
      List<@NotNull PsiFragment> fragments = template.getFragments();
      List<@NotNull PsiExpression> expressions = template.getEmbeddedExpressions();
      CommentTracker ct = new CommentTracker();
      StringBuilder concatenation = new StringBuilder();
      boolean stringSeen = false;
      for (int i = 0; i < expressions.size(); i++) {
        PsiFragment fragment = fragments.get(i);
        String value = fragment.getValue();
        if (value == null) return;
        if (!value.isEmpty() || i > 0 && !stringSeen) {
          if (!concatenation.isEmpty()) concatenation.append('+');
          concatenation.append('"').append(StringUtil.escapeStringCharacters(value)).append('"');
          stringSeen = true;
        }
        if (!concatenation.isEmpty()) concatenation.append('+');
        PsiExpression expression = expressions.get(i);
        int precedence = PsiPrecedenceUtil.getPrecedence(expression);
        boolean string = ExpressionUtils.hasStringType(expression);
        boolean needParentheses = 
          precedence > PsiPrecedenceUtil.ADDITIVE_PRECEDENCE ||
          stringSeen && precedence == PsiPrecedenceUtil.ADDITIVE_PRECEDENCE && !string;
        if (needParentheses) {
          concatenation.append('(').append(ct.text(expression)).append(')');
        }
        else {
          String text = ct.text(expression);
          concatenation.append(text.isEmpty() ? "null" : text);
        }
        if (string) stringSeen = true;
      }
      String last = fragments.get(fragments.size() - 1).getValue();
      if (last == null) return;
      if (!last.isEmpty()) {
        concatenation.append("+\"").append(StringUtil.escapeStringCharacters(last)).append('"');
      }
      ct.replaceAndRestoreComments(templateExpression, concatenation.toString());
    }
@Override
    protected void applyFix(@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater)