void (@NotNull PsiElement element) { final PsiConditionalExpression conditionalExpression = (PsiConditionalExpression)element; PsiExpression condition = conditionalExpression.getCondition(); PsiExpression thenExpression = conditionalExpression.getThenExpression(); PsiExpression elseExpression = conditionalExpression.getElseExpression(); CommentTracker tracker = new CommentTracker(); final String newExpression = tracker.text(condition) + '?' + BoolUtils.getNegatedExpressionText(thenExpression, tracker) + ':' + BoolUtils.getNegatedExpressionText(elseExpression, tracker); PsiReplacementUtil.replaceExpressionWithNegatedExpression(conditionalExpression, newExpression, tracker); }