private @NotNull GlobalSearchScope getPsiFileResolveScope(@NotNull PsiFile psiFile) {
    if (psiFile instanceof FileResolveScopeProvider) {
      return ((FileResolveScopeProvider)psiFile).getFileResolveScope();
    }
    if (!psiFile.getOriginalFile().isPhysical() && !psiFile.getViewProvider().isPhysical()) {
      return withFile(psiFile, GlobalSearchScope.allScope(myProject));
    }
    return getResolveScopeFromProviders(psiFile.getViewProvider().getVirtualFile());
  }
private @NotNull GlobalSearchScope getPsiFileResolveScope(@NotNull PsiFile psiFile)