private static List<? extends GotoRelatedItem> getRelatedFiles(@NotNull PsiFile file) {
    List<GotoRelatedItem> items = new ArrayList<>();

    for (PsiFile psiFile : file.getViewProvider().getAllFiles()) {
      if (psiFile instanceof XmlFile xmlFile) {

        for (RelatedToHtmlFilesContributor contributor : RelatedToHtmlFilesContributor.EP_NAME.getExtensionList()) {
          HashSet<PsiFile> resultSet = new HashSet<>();
          contributor.fillRelatedFiles(xmlFile, resultSet);
          for (PsiFile f: resultSet) {
            items.add(new GotoRelatedItem(f, contributor.getGroupName()));
          }
        }
      }
    }
    return items;
  }
private static List<? extends GotoRelatedItem> getRelatedFiles(@NotNull PsiFile file)