boolean (@NotNull PsiVariable boolFlag, @NotNull PsiExpression expression) { Object constantExpression = ExpressionUtils.computeConstantExpression(expression); if (!(constantExpression instanceof Boolean)) return false; boolean assignmentValue = (boolean)constantExpression; return ExpressionUtils.isLiteral(PsiUtil.skipParenthesizedExprDown(boolFlag.getInitializer()), !assignmentValue); }