LocalQuickFix (@NotNull PsiReferenceExpression refExpr, boolean increment) { final String refName = refExpr.getReferenceName(); if (refName == null) { return null; } final PsiPrefixExpression topPrefixExpr = ObjectUtils.tryCast(refExpr.getParent().getParent(), PsiPrefixExpression.class); if (topPrefixExpr == null) { return null; } final PsiType refExprType = refExpr.getType(); if (TypeUtils.unaryNumericPromotion(refExprType) != refExprType && MethodCallUtils.isNecessaryForSurroundingMethodCall(topPrefixExpr, refExpr)) { return null; } final PsiVariable resolved = ObjectUtils.tryCast(refExpr.resolve(), PsiVariable.class); if (resolved == null || resolved.hasModifierProperty(PsiModifier.FINAL)) { return null; } return new ConvertDoubleUnaryToPrefixOperationFix(refName, increment); }