void injectReference(@NotNull Language language,
                       @NotNull String prefix,
                       @NotNull String suffix,
                       @NotNull PsiLanguageInjectionHost host,
                       @NotNull TextRange rangeInsideHost) {
    ParserDefinition parser = LanguageParserDefinitions.INSTANCE.forLanguage(language);
    if (parser != null) {
      throw new IllegalArgumentException("Language "+language+" being injected as reference must not have ParserDefinition and yet - "+parser);
    }
    ReferenceInjector injector = ReferenceInjector.findById(language.getID());
    if (injector == null) {
      throw new IllegalArgumentException("Language "+language+" being injected as reference must register reference injector");
    }
    placeInfos = new SmartList<>();

    if (!cleared) {
      clear();
      throw new IllegalStateException("Seems you haven't called doneInjecting()");
    }

    myLanguage = language;
    currentThread = Thread.currentThread();

    addPlace(prefix, suffix, host, rangeInsideHost);
    Place place = new Place();
    StringBuilder decodedChars = new StringBuilder();
    ShredImpl shred = createShred(placeInfos.get(0), decodedChars, myHostPsiFile);
    place.add(shred);
    addReferenceToResults(Pair.create(injector, place));
    clear();
  }
void injectReference(@NotNull Language language,
                       @NotNull String prefix,
                       @NotNull String suffix,
                       @NotNull PsiLanguageInjectionHost host,
                       @NotNull TextRange rangeInsideHost)