ProblemDescriptor (@NotNull PsiFile file, @NotNull HighlightSeverity severity, int startOffset, int endOffset, @NotNull @InspectionMessage String message, boolean isAfterEndOfLine, @NotNull LocalQuickFix @NotNull [] quickFixes) { if (severity == HighlightSeverity.INFORMATION || startOffset == endOffset && !isAfterEndOfLine) { return null; } final PsiElement startElement; final PsiElement endElement; if (startOffset == endOffset) { startElement = endElement = file.findElementAt(endOffset - 1); } else { startElement = file.findElementAt(startOffset); endElement = file.findElementAt(endOffset - 1); } if (startElement == null || endElement == null) { return null; } final TextRange rangeInElement = getRangeInElement(startElement, startOffset, endElement, endOffset); ProblemHighlightType highlightType = HighlightInfo.convertSeverityToProblemHighlight(severity); return new ProblemDescriptorBase(startElement, endElement, message, quickFixes, highlightType, isAfterEndOfLine, rangeInElement, true, false); }