boolean (PsiElement anchor, boolean evaluatesToTrue) { PsiElement parent = PsiUtil.skipParenthesizedExprUp(anchor.getParent()); if (parent instanceof PsiPolyadicExpression polyadic) { IElementType tokenType = polyadic.getOperationTokenType(); return tokenType.equals(JavaTokenType.ANDAND) && !evaluatesToTrue || tokenType.equals(JavaTokenType.OROR) && evaluatesToTrue; } return parent instanceof PsiExpression && BoolUtils.isNegation((PsiExpression)parent); }