@Override
  public void doneInjecting() {
    checkThreading();
    try {
      if (myLanguage == null) {
        throw new IllegalStateException("Seems you haven't called startInjecting()");
      }
      if (placeInfos.isEmpty()) {
        throw new IllegalStateException("Seems you haven't called addPlace()");
      }
      Language forcedLanguage = myContextElement.getUserData(SingleRootInjectedFileViewProvider.LANGUAGE_FOR_INJECTED_COPY_KEY);
      checkForCorrectContextElement(placeInfos, myContextElement, myLanguage, myHostPsiFile, myHostVirtualFile, myHostDocument,
                                    myDocumentManagerBase);

      createAndRegisterInjected(forcedLanguage);
    }
    finally {
      clear();
    }
  }
@Override
  public void doneInjecting()