public static @NotNull Editor getInjectedEditorForInjectedFile(@NotNull Editor hostEditor, final @Nullable PsiFile injectedFile) {
    return getInjectedEditorForInjectedFile(hostEditor, hostEditor.getCaretModel().getCurrentCaret(), injectedFile);
  }
public static @NotNull Editor getInjectedEditorForInjectedFile(@NotNull Editor hostEditor, final @Nullable PsiFile injectedFile)