private void createError(@NotNull PsiExpression expression,
                               @NotNull MessageFormatUtil.MessageFormatError error,
                               @NotNull String pattern,
                               int start, int end) {
        MessageFormatUtil.MessageFormatErrorType type = error.errorType();
        //it's relevant mostly for IDEA files
        if (type == MessageFormatUtil.MessageFormatErrorType.QUOTED_PLACEHOLDER) {
          return;
        }
        String relatedText = getRelatedText(pattern, error);
        if (relatedText == null) {
          return;
        }
        String errorText = getMessageFormatTemplate(type, relatedText);
        if (start >= 0) {
          errorText = InspectionGadgetsBundle.message("inspection.incorrect.message.format.pattern", errorText, pattern);
        }
        else {
          start = error.fromIndex();
          end = error.toIndex();
        }
        ProblemHighlightType highlightType = getCustomHighlightType(type);
        if (highlightType == null) {
          holder.registerProblem(expression, TextRange.create(start, end), errorText);
        }
        else {
          holder.registerProblem(expression, errorText, highlightType, TextRange.create(start, end));
        }
      }
private void createError(@NotNull PsiExpression expression,
                               @NotNull MessageFormatUtil.MessageFormatError error,
                               @NotNull String pattern,
                               int start, int end)