void (@NotNull Project project, @NotNull PsiElement methodNameToken, @NotNull ModPsiUpdater updater) { final PsiElement methodCallExpression = methodNameToken.getParent(); assert methodCallExpression != null; final PsiMethodCallExpression methodCall = (PsiMethodCallExpression)methodCallExpression.getParent(); assert methodCall != null; final PsiReferenceExpression expression = methodCall.getMethodExpression(); final PsiExpression qualifier = expression.getQualifierExpression(); assert qualifier != null; CommentTracker commentTracker = new CommentTracker(); final String newExpression = commentTracker.text(qualifier); PsiReplacementUtil.replaceExpression(methodCall, newExpression, commentTracker); }