boolean (@NotNull PsiElement start, @NotNull final PsiElement end) { boolean result = false; PsiElement parent = start; while (parent != end) { start = parent; parent = parent.getParent(); if (!(parent instanceof PsiPolyadicExpression)) continue; final IElementType op = ((PsiPolyadicExpression)parent).getOperationTokenType(); if (op == JavaTokenType.MINUS && parent.getFirstChild() != start) { result = !result; } } return result; }