@NotNull
  private TextChunk[] initChunks() {
    PsiFile psiFile = getPsiFile();
    Document document =
        psiFile == null ? null : PsiDocumentManager.getInstance(getProject()).getDocument(psiFile);
    TextChunk[] chunks;
    if (document == null) {
      // element over light virtual file
      PsiElement element = getElement();
      chunks = new TextChunk[] {new TextChunk(new TextAttributes(), element.getText())};
    } else {
      chunks = ChunkExtractor.extractChunks(psiFile, this);
    }

    myTextChunks = new SoftReference<TextChunk[]>(chunks);
    return chunks;
  }
 public Document getDocument() {
   PsiFile file = getUsageInfo().getFile();
   if (file == null) return null;
   return PsiDocumentManager.getInstance(getProject()).getDocument(file);
 }