void (@NotNull StringBuilder lineAnchor, PsiElement psiElement) { final PsiFile file = psiElement.getContainingFile(); if (file != null) { final VirtualFile vFile = file.getVirtualFile(); if (vFile != null) { Document doc = FileDocumentManager.getInstance().getDocument(vFile); final int lineNumber = doc.getLineNumber(psiElement.getTextOffset()) + 1; lineAnchor.append(" ").append(AnalysisBundle.message("inspection.export.results.at.line")).append(" "); int offset = doc.getLineStartOffset(lineNumber - 1); offset = CharArrayUtil.shiftForward(doc.getCharsSequence(), offset, " \t"); HtmlChunk.link(vFile.getUrl() + "#" + offset, String.valueOf(lineNumber)).appendTo(lineAnchor); } } }