TextChunk (@NotNull PsiElement start, @NotNull PsiElement end) { Document document = PsiDocumentManager.getInstance(start.getProject()).getDocument(start.getContainingFile()); if (document != null) { int startLine = getLineNumber(document, start.getTextRange().getStartOffset()) + 1; int endLine = getLineNumber(document, end.getTextRange().getEndOffset()) + 1; String lineText = startLine == endLine ? Integer.toString(startLine) : startLine + ".." + endLine; return new TextChunk(UsageTreeColors.NUMBER_OF_USAGES_ATTRIBUTES.toTextAttributes(), lineText + " "); } return null; }