@Override
    void collapse(@NotNull PsiElement anchor) {
      PsiIfStatement ifStatement = tryCast(anchor, PsiIfStatement.class);
      if (ifStatement == null) return;
      PsiStatement result = collapseIf(ifStatement, "?:");
      if (result == null) return;
      myUpstream.collapse(myUpstream.anchor(result));
    }
@Override
    void collapse(@NotNull PsiElement anchor)