@Override
    void collapse(@NotNull PsiElement anchor) {
      PsiBlockStatement blockStatement = tryCast(anchor, PsiBlockStatement.class);
      if (blockStatement == null) return;
      PsiStatement statement = ControlFlowUtils.getOnlyStatementInBlock(blockStatement.getCodeBlock());
      if (!(statement instanceof PsiYieldStatement)) return;
      PsiExpression expression = ((PsiYieldStatement)statement).getExpression();
      if (expression == null) return;
      CommentTracker ct = new CommentTracker();
      ct.replaceAndRestoreComments(blockStatement, ct.text(expression) + ";");
    }
@Override
    void collapse(@NotNull PsiElement anchor)