@Nullable PsiReference restoreReference() {
    PsiFile file = myReferencePointer == null ? null : myReferencePointer.getContainingFile();
    Segment range = myReferencePointer == null ? null : myReferencePointer.getPsiRange();
    return file == null || range == null ? null : file.findReferenceAt(range.getStartOffset());
  }
@Nullable PsiReference restoreReference()