void () { @SuppressWarnings("SpellCheckingInspection") /* * ( 0th) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * ( 1st) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * ... * caret * v * (10th) Lorem ipsum dolor sit amet, |consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * ^ * the text to be typed: "unus duo tres " * ... * (29th) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. */ final int caretInitialLineIndex = 10; final int caretInitialColumnIndex = 28; final int caretInitialDot = caretInitialLineIndex * (LOREM_IPSUM.length() + 1) + caretInitialColumnIndex; final EditorImpl editor = initEditor( StringUtil.repeat(LOREM_IPSUM + '\n', 30), caretInitialLineIndex, caretInitialColumnIndex, caretInitialDot ); doTestCaretNotifications( editor.getContentComponent(), new CaretAction(() -> type('u'), new CaretPos(caretInitialDot + 1, caretInitialDot + 1)), new CaretAction(() -> type('n'), new CaretPos(caretInitialDot + 2, caretInitialDot + 2)), new CaretAction(() -> type('u'), new CaretPos(caretInitialDot + 3, caretInitialDot + 3)), new CaretAction(() -> type('s'), new CaretPos(caretInitialDot + 4, caretInitialDot + 4)), new CaretAction(() -> type(' '), new CaretPos(caretInitialDot + 5, caretInitialDot + 5)), new CaretAction(() -> type('d'), new CaretPos(caretInitialDot + 6, caretInitialDot + 6)), new CaretAction(() -> type('u'), new CaretPos(caretInitialDot + 7, caretInitialDot + 7)), new CaretAction(() -> type('o'), new CaretPos(caretInitialDot + 8, caretInitialDot + 8)), new CaretAction(() -> type(' '), new CaretPos(caretInitialDot + 9, caretInitialDot + 9)), new CaretAction(() -> type('t'), new CaretPos(caretInitialDot + 10, caretInitialDot + 10)), new CaretAction(() -> type('r'), new CaretPos(caretInitialDot + 11, caretInitialDot + 11)), new CaretAction(() -> type('e'), new CaretPos(caretInitialDot + 12, caretInitialDot + 12)), new CaretAction(() -> type('s'), new CaretPos(caretInitialDot + 13, caretInitialDot + 13)), new CaretAction(() -> type(' '), new CaretPos(caretInitialDot + 14, caretInitialDot + 14)) ); }