private static @NotNull Collection<FileTargetContext> getTargetAbsoluteTopLevelContexts(@NotNull FileReferenceSetParameters parameters,
                                                                                          @NotNull PsiFile file) {
    VirtualFile virtualFile = file.getVirtualFile();
    if (virtualFile == null) return emptyList();

    PsiDirectory parent = file.getParent();
    Module module = ModuleUtilCore.findModuleForPsiElement(parent == null ? file : parent);
    if (module == null) return emptyList();

    Set<FileTargetContext> result = new LinkedHashSet<>();
    Project project = file.getProject();
    CommonProcessors.CollectProcessor<FileTargetContext> processor = new CommonProcessors.CollectProcessor<>(result);
    for (FileReferenceHelper helper : FileReferenceHelperRegistrar.getHelpers()) {
      if (helper.isMine(project, virtualFile)) {
        if (helper.isFallback() && !result.isEmpty()) {
          continue;
        }
        if (!helper.processTargetContexts(parameters, virtualFile, processor)) break;
      }
    }
    return new ArrayList<>(result);
  }
private static @NotNull Collection<FileTargetContext> getTargetAbsoluteTopLevelContexts(@NotNull FileReferenceSetParameters parameters,
                                                                                          @NotNull PsiFile file)