void (@Nullable PsiElement declaration) { if (declaration == null) return; final PsiLocalVariable newVariable = extractDeclared(declaration); if (newVariable != null) { final PsiExpression initializer = PsiUtil.skipParenthesizedExprDown(newVariable.getInitializer()); if (VariableAccessUtils.isLocalVariableCopy(newVariable, initializer)) { List<PsiReferenceExpression> references = VariableAccessUtils.getVariableReferences(newVariable, PsiUtil.getVariableCodeBlock(newVariable, null)); for (PsiJavaCodeReferenceElement reference : references) { CommonJavaInlineUtil.getInstance().inlineVariable(newVariable, initializer, reference, null); } declaration.delete(); } } }