VariableArrayTypeFix (PsiArrayInitializerExpression initializer, @NotNull PsiType componentType) { PsiArrayType arrayType = new PsiArrayType(componentType); PsiArrayInitializerExpression arrayInitializer = initializer; while (arrayInitializer.getParent() instanceof PsiArrayInitializerExpression) { arrayInitializer = (PsiArrayInitializerExpression)arrayInitializer.getParent(); arrayType = new PsiArrayType(arrayType); } PsiVariable variable = getVariableLocal(arrayInitializer); if (variable == null) return null; return new VariableArrayTypeFix(arrayInitializer, arrayType, variable); }