void (Project project, @NotNull PsiClass targetClass) { Data data = generateMethod(targetClass, false); final PsiElement context = PsiTreeUtil.getParentOfType(getRefExpr(), PsiClass.class, PsiMethod.class, PsiFile.class); IntentionUtils.createTemplateForMethod(data.paramTypesExpressions, data.method, targetClass, data.constraints, false, context); }