示例#1
0
  /**
   * Redoes the composite record. This implementation redoes each sub-record in the order they were
   * originally executed.
   *
   * @see ActivityRecord#redo()
   * @see org.eclipse.birt.report.model.activity.ActivityStack#redo()
   */
  public void redo() {
    // Since undo/redo has no information about the transaction stack,
    // establish a tricky way to restore the information about the
    // transaction stack. Because filter/layout compound record only
    // includes filter/layout compound record, records in
    // <code>recordList</code> only need to know the compound record they
    // reside in. That is, "this".

    Stack<CompoundRecord> stack = new Stack<CompoundRecord>();
    stack.push(this);

    for (int i = 0; i < recordList.size(); i++) {
      ActivityRecord record = recordList.get(i);
      assert record.getState() == ActivityRecord.UNDONE_STATE;
      record.redo();
      record.setState(ActivityRecord.REDONE_STATE);
      record.performPostTasks(stack);
    }
  }