TextRange () { ApplicationManager.getApplication().assertReadAccessAllowed(); SelectionMarker marker = mySelectionMarker; if (hasSelection(marker)) { return marker.getTextRange(); } else { int offset = getOffset(); return TextRange.create(offset, offset); } }