void (@Nullable PsiFile psiFile, @NotNull StringBuilder failMessage, @NotNull String text, @NotNull HighlightInfo info, @NotNull String messageType) { String fileName = psiFile == null ? "" : psiFile.getName() + ": "; int startOffset = info.startOffset; int endOffset = info.endOffset; String s = text.substring(startOffset, endOffset); String desc = info.getDescription(); if (failMessage.length() > 0) { failMessage.append('\n'); } failMessage.append(fileName).append(messageType) .append(rangeString(text, startOffset, endOffset)) .append(": '").append(s).append('\''); if (desc != null) { failMessage.append(" (").append(desc).append(')'); } }