private @Nullable Set<VirtualFile> getReferentFiles(@NotNull PsiElement element,
                                                      boolean buildHierarchyForLibraryElements,
                                                      @NotNull ReferentFileSearcher referentFileSearcher) {
    final CompilerElementInfo compilerElementInfo = asCompilerElements(element, buildHierarchyForLibraryElements, true);
    if (compilerElementInfo == null) return null;

    if (!myReadDataLock.tryLock()) return null;
    try {
      if (myReader == null) return null;
      Set<VirtualFile> referentFileIds = VfsUtilCore.createCompactVirtualFileSet();
      for (CompilerRef ref : compilerElementInfo.searchElements) {
        try {
          Set<VirtualFile> referents = referentFileSearcher.findReferentFiles(ref, compilerElementInfo.place);
          if (referents == null) {
            return null;
          }
          referentFileIds.addAll(referents);
        }
        catch (StorageException e) {
          throw new RuntimeException(e);
        }
      }
      return referentFileIds;

    }
    finally {
      myReadDataLock.unlock();
    }
  }
private @Nullable Set<VirtualFile> getReferentFiles(@NotNull PsiElement element,
                                                      boolean buildHierarchyForLibraryElements,
                                                      @NotNull ReferentFileSearcher referentFileSearcher)