WrapWithMutableCollectionFix (@NotNull PsiElement anchor) { PsiLocalVariable variable = getVariable(anchor); if (variable == null) return null; PsiExpression initializer = variable.getInitializer(); if (initializer == null) return null; String wrapper = getWrapperByType(variable.getType()); if (wrapper == null) return null; PsiElement block = PsiUtil.getVariableCodeBlock(variable, null); if (block == null) return null; if (!HighlightControlFlowUtil.isEffectivelyFinal(variable, block, null)) return null; return new WrapWithMutableCollectionFix(variable.getName(), wrapper); }