boolean (@NotNull PsiFile file, @NotNull ExceptionLineRefiner refiner, int lineStart, int lineEnd) { if (refiner.getExceptionInfo() != null) { PsiElement element = file.findElementAt(lineStart); Document document = PsiDocumentManager.getInstance(file.getProject()).getDocument(file); if (document == null) { return true; } while (element != null && element.getTextRange().getStartOffset() < lineEnd) { PsiElement parent = PsiTreeUtil.getParentOfType(element, PsiStatement.class, PsiField.class); if (parent != null) { int lineNumberStart = document.getLineNumber(parent.getTextOffset()); int lineNumberEnd = document.getLineNumber(parent.getTextOffset() + parent.getTextLength()); if (lineNumberStart != lineNumberEnd) { return true; } } element = PsiTreeUtil.nextLeaf(element); } } return false; }