void () { if (mySelectionUpdatedFromSearchResults) return; SelectionModel selectionModel = myEditor.getSelectionModel(); Document document = myEditor.getDocument(); myStartSessionSelectionMarker = document.createRangeMarker( selectionModel.getSelectionStart(), selectionModel.getSelectionEnd() ); myStartSessionCaretMarker = document.createRangeMarker( myEditor.getCaretModel().getOffset(), myEditor.getCaretModel().getOffset() ); myStartSelectedText = selectionModel.getSelectedText(); }