void () { @SuppressWarnings("SpellCheckingInspection") /* * dot and mark * (initial pos and after step 15) * v * (0th) |$Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * ^ * Actions from here: * 1. Left with selection x 2 (no notifications are expected) * 2. Up with selection x 2 (no notifications are expected) * 3. Left with selection (no notifications are expected) * 4. Up with selection (no notifications are expected) * 5. Right with selection x 3 * 6. Down with selection x 2 * 7. Right with selection * 8. Down with selection * 9. Right with selection * 10. Down with selection x 2 * * (1st) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * (2nd) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * (3rd) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * (4th) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * * dot * (after step 10) * v * (5th) Lorem$ ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. * ^ * Actions from here: * 11. Up with selection x 3 * 12. Down with selection * 13. Up with selection x 2 * 14. Left by word with selection * 15. Up with selection */ final var editor = initEditor(StringUtil.repeat(LOREM_IPSUM + '\n', 5) + LOREM_IPSUM, 0, 0, 0); //noinspection DuplicateExpressions doTestCaretNotifications( editor.getContentComponent(), // step 1 new CaretAction(() -> leftWithSelection(), null), new CaretAction(() -> leftWithSelection(), null), // step 2 new CaretAction(() -> upWithSelection(), null), new CaretAction(() -> upWithSelection(), null), // step 3 new CaretAction(() -> leftWithSelection(), null), // step 4 new CaretAction(() -> upWithSelection(), null), // step 5 new CaretAction(() -> rightWithSelection(), new CaretPos(1, 0)), new CaretAction(() -> rightWithSelection(), new CaretPos(2, 0)), new CaretAction(() -> rightWithSelection(), new CaretPos(3, 0)), // step 6 new CaretAction(() -> downWithSelection(), new CaretPos(3 + (LOREM_IPSUM.length() + 1), 0)), new CaretAction(() -> downWithSelection(), new CaretPos(3 + 2 * (LOREM_IPSUM.length() + 1), 0)), // step 7 new CaretAction(() -> rightWithSelection(), new CaretPos(4 + 2 * (LOREM_IPSUM.length() + 1), 0)), // step 8 new CaretAction(() -> downWithSelection(), new CaretPos(4 + 3 * (LOREM_IPSUM.length() + 1), 0)), // step 9 new CaretAction(() -> rightWithSelection(), new CaretPos(5 + 3 * (LOREM_IPSUM.length() + 1), 0)), // step 10 new CaretAction(() -> downWithSelection(), new CaretPos(5 + 4 * (LOREM_IPSUM.length() + 1), 0)), new CaretAction(() -> downWithSelection(), new CaretPos(5 + 5 * (LOREM_IPSUM.length() + 1), 0)), // step 11 new CaretAction(() -> upWithSelection(), new CaretPos(5 + 4 * (LOREM_IPSUM.length() + 1), 0)), new CaretAction(() -> upWithSelection(), new CaretPos(5 + 3 * (LOREM_IPSUM.length() + 1), 0)), new CaretAction(() -> upWithSelection(), new CaretPos(5 + 2 * (LOREM_IPSUM.length() + 1), 0)), // step 12 new CaretAction(() -> downWithSelection(), new CaretPos(5 + 3 * (LOREM_IPSUM.length() + 1), 0)), // step 13 new CaretAction(() -> upWithSelection(), new CaretPos(5 + 2 * (LOREM_IPSUM.length() + 1), 0)), new CaretAction(() -> upWithSelection(), new CaretPos(5 + (LOREM_IPSUM.length() + 1), 0)), // step 14 new CaretAction(() -> moveCaretToPreviousWordWithSelection(), new CaretPos(LOREM_IPSUM.length() + 1, 0)), // step 15 new CaretAction(() -> upWithSelection(), new CaretPos(0, 0)) ); }