@NotNull
  Editor createEditor(final @NotNull DocumentWindowImpl documentRange,
                      final @NotNull EditorImpl editor,
                      final @NotNull PsiFile injectedFile) {
    assert documentRange.isValid();
    assert injectedFile.isValid();
    Ref<EditorWindowImpl> editorWindow = Ref.create();
    synchronized (allEditors) {
      for (EditorWindowImpl oldEditorWindow : allEditors) {
        if (oldEditorWindow.getDocument() == documentRange && oldEditorWindow.getDelegate() == editor) {
          oldEditorWindow.myInjectedFile = injectedFile;
          if (oldEditorWindow.isValid()) {
            return oldEditorWindow;
          }
        }
      }
      editor.executeNonCancelableBlock(()-> {
        EditorWindowImpl newEditorWindow = new EditorWindowImpl(documentRange, editor, injectedFile, documentRange.isOneLine());
        editorWindow.set(newEditorWindow);
        allEditors.add(newEditorWindow);
        newEditorWindow.assertValid();
      });
    }
    return editorWindow.get();
  }
@NotNull
  Editor createEditor(final @NotNull DocumentWindowImpl documentRange,
                      final @NotNull EditorImpl editor,
                      final @NotNull PsiFile injectedFile)