boolean (@Nullable PsiPrefixExpression prefixExpression) { if (prefixExpression == null) return false; final PsiJavaToken operator = prefixExpression.getOperationSign(); final PsiExpression operand = prefixExpression.getOperand(); PsiElement nextSibling = operator.getNextSibling(); while (nextSibling != operand) { if (!(nextSibling instanceof PsiWhiteSpace)) { return false; } nextSibling = nextSibling.getNextSibling(); } return true; }