public static boolean hasXmlViewProvider(@NotNull PsiFile file) {
    for (PsiFile f : file.getViewProvider().getAllFiles()) {
      if (f instanceof XmlFile) {
        return true;
      }
    }
    return false;
  }
public static boolean hasXmlViewProvider(@NotNull PsiFile file)