private static @Nullable FileReference findFileReference(final List<? extends PsiReference> references) {
    FileReference fileReference = null;
    for (PsiReference reference : references) {
      if (reference instanceof FileReference) {
        fileReference = ((FileReference)reference).getFileReferenceSet().getLastReference();
        break;
      }
    }
    return fileReference;
  }
private static @Nullable FileReference findFileReference(final List<? extends PsiReference> references)