void (PsiExpression defToInline, Map<PsiParameter, Collection<PsiReference>> paramsToInline) { for (Map.Entry<PsiParameter, Collection<PsiReference>> entry : paramsToInline.entrySet()) { Collection<PsiReference> refsToInline = entry.getValue(); try { PsiExpression[] exprs = new PsiExpression[refsToInline.size()]; int idx = 0; for (PsiReference reference : refsToInline) { if (reference instanceof PsiJavaCodeReferenceElement) { exprs[idx++] = CommonJavaInlineUtil.getInstance().inlineVariable(entry.getKey(), defToInline, (PsiJavaCodeReferenceElement)reference, null); } } for (PsiExpression expr : exprs) { if (expr != null) CommonJavaRefactoringUtil.tryToInlineArrayCreationForVarargs(expr); } } catch (IncorrectOperationException e) { LOG.error(e); } } }