@Override
  public final PsiFile getCachedPsiFile(@NotNull Document document) {
    VirtualFile virtualFile = FileDocumentManager.getInstance().getFile(document);
    return virtualFile == null || !virtualFile.isValid() ? null : getCachedPsiFile(virtualFile);
  }
@Override
  public final PsiFile getCachedPsiFile(@NotNull Document document)