TextRange (PsiMethodCallExpression call) { PsiReferenceExpression expression = call.getMethodExpression(); PsiElement nameElement = expression.getReferenceNameElement(); LOG.assertTrue(nameElement != null); return new TextRange(nameElement.getStartOffsetInParent(), call.getTextLength()); }