List<SmartPsiElementPointer<PsiExpression>> (@NotNull Project project, @NotNull PsiVariable local, PsiExpression defToInline, @NotNull List<PsiElement> refsToInline) { List<SmartPsiElementPointer<PsiExpression>> pointers = new ArrayList<>(); final SmartPointerManager pointerManager = SmartPointerManager.getInstance(project); for (PsiElement element : refsToInline) { PsiJavaCodeReferenceElement refElement = (PsiJavaCodeReferenceElement)element; pointers.add(pointerManager.createSmartPsiElementPointer(InlineUtil.inlineVariable(local, defToInline, refElement))); } return pointers; }