@NotNull
  private static List<Integer> getCaretOffsets(Editor editor) {
    return ContainerUtil.map(editor.getCaretModel().getAllCarets(), caret -> caret.getOffset());
  }
@NotNull
  private static List<Integer> getCaretOffsets(Editor editor)