TextRange (PsiExpression occurrence) { RangeMarker rangeMarker = occurrence.getUserData(ElementToWorkOn.TEXT_RANGE); if (rangeMarker != null) { return rangeMarker.getTextRange(); } return occurrence.getTextRange(); }