private static boolean processRelatedFiles(PsiFile file, VirtualFile[] files, PsiElementProcessor<? super XmlFile> processor) {
    Project project = file.getProject();
    final PsiManager psiManager = PsiManager.getInstance(project);
    final PsiFile[] psiFiles = ContainerUtil.map2Array(files, PsiFile.class, (NullableFunction<VirtualFile, PsiFile>)file1 -> psiManager.findFile(file1));

    for (final PsiFile psiFile : psiFiles) {
      if (!processFile(psiFile, processor)) {
        return false;
      }
    }
    return true;
  }
private static boolean processRelatedFiles(PsiFile file, VirtualFile[] files, PsiElementProcessor<? super XmlFile> processor)