private static @Nullable VirtualFile findChild(@NotNull VirtualFile root,
                                                 @NotNull String relPath,
                                                 String @NotNull [] extensions) {
    VirtualFile file = null;
    for (String extension : extensions) {
      file = root.findChild(relPath + '.' + extension);
      if (file != null) break;
    }
    return file;
  }
private static @Nullable VirtualFile findChild(@NotNull VirtualFile root,
                                                 @NotNull String relPath,
                                                 String @NotNull [] extensions)