@Override
  public void getLanguagesToInject(@NotNull final MultiHostRegistrar registrar, @NotNull PsiElement host) {
    final XmlElement xmlElement = (XmlElement) host;
    if (!isInIndex(xmlElement)) return;
    final TreeSet<TextRange> ranges = new TreeSet<>(InjectorUtils.RANGE_COMPARATOR);
    final PsiFile containingFile = xmlElement.getContainingFile();
    final Ref<Boolean> unparsableRef = Ref.create();
    getInjectedLanguage(xmlElement, unparsableRef, (language, list) -> {
      for (InjectionInfo trinity : list) {
        if (ranges.contains(trinity.range().shiftRight(trinity.host().getTextRange().getStartOffset()))) return true;
      }
      for (InjectionInfo trinity : list) {
        if (trinity.host().getContainingFile() != containingFile) continue;
        final TextRange textRange = trinity.range();
        ranges.add(textRange.shiftRight(trinity.host().getTextRange().getStartOffset()));
      }
      InjectorUtils.registerInjection(language, containingFile, list, registrar);
      InjectorUtils.registerSupport(InjectorUtils.findNotNullInjectionSupport(XmlLanguageInjectionSupport.XML_SUPPORT_ID),
                                    true, list.get(0).host(), language);
      if (Boolean.TRUE.equals(unparsableRef.get())) {
        InjectorUtils.putInjectedFileUserData(host, language, InjectedLanguageUtil.FRANKENSTEIN_INJECTION, Boolean.TRUE);
      }
      return true;
    });
  }
@Override
  public void getLanguagesToInject(@NotNull final MultiHostRegistrar registrar, @NotNull PsiElement host)