@Override
  public void registerExtensions(@NotNull final Extensions extensions, @NotNull final DomExtensionsRegistrar registrar) {
    Project project = extensions.getManager().getProject();
    VirtualFile currentFile = getVirtualFile(extensions);
    if (currentFile == null || DumbService.isDumb(project)) return;

    Set<VirtualFile> files = getVisibleFiles(project, currentFile);

    String epPrefix = extensions.getEpPrefix();
    Map<String, Supplier<ExtensionPoint>> points = ExtensionPointIndex.getExtensionPoints(project, files, epPrefix);

    for (Map.Entry<String, Supplier<ExtensionPoint>> entry : points.entrySet()) {
      registrar.registerCollectionChildrenExtension(new XmlName(entry.getKey().substring(epPrefix.length())), Extension.class)
        .setDeclaringDomElement(entry.getValue())
        .addExtender(EXTENSION_EXTENDER);
    }

    // "fallback" extension
    registrar.registerCustomChildrenExtension(Extensions.UnresolvedExtension.class, new CustomDomChildrenDescription.TagNameDescriptor());
  }
@Override
  public void registerExtensions(@NotNull final Extensions extensions, @NotNull final DomExtensionsRegistrar registrar)