void (PsiMethodReferenceExpression reference) { final PsiLambdaExpression lambdaExpression = LambdaRefactoringUtil.convertMethodReferenceToLambda(reference, false, false); if (lambdaExpression == null) return; final PsiExpression callExpression = LambdaUtil.extractSingleExpressionFromBody(lambdaExpression.getBody()); if (callExpression instanceof PsiMethodCallExpression) { inlineMethodCall(((PsiMethodCallExpression)callExpression).getMethodExpression()); } else if (callExpression instanceof PsiCall) { inlineConstructorCall((PsiCall)callExpression); } else { LOG.error("Unexpected expr: " + callExpression.getText()); } LambdaRefactoringUtil.simplifyToExpressionLambda(lambdaExpression); }