private @Nullable String getContainingFileName(RefElement ref) {
    SmartPsiElementPointer pointer = ref.getPointer();
    if (pointer == null) return null;
    PsiFile file = pointer.getContainingFile();
    if (file == null) return null;
    return file.getName();
  }
private @Nullable String getContainingFileName(RefElement ref)