Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4156285

UndoableEdit.addEdit, replaceEdit should clarify edit order

XMLWordPrintable



      Name: rm29839 Date: 07/10/98


      The documentation for methods UndoableEdit.addEdit
      and UndoableEdit.replaceEdit would be significantly
      clearer if it mentioned the chronological order
      of the edits (that is, whether each anEdit
      parameter is a later edit or an earlier edit).

      The chronological order is important because the
      interpretation of offsets in the edit argument
      differs depending on whether the edit is a later
      edit or an earlier edit.

      That is, doing edit A and then edit B is different
      from doing edit B and then edit A, if the
      interpretation of the offsets in one edit is
      affected by changes in offset numbering caused by
      the other edit.


      Apparently, the anEdit paragraph to addEdit is
      an edit that occurred after the edit(s) represent
      by the "this" edit. The documentation should
      state that. (You could even rename the parameter
      to something like "laterEdit" to be even clearer.)

      I can't suggest a clarification for replaceEdit
      because I don't understand it well enough (because
      the documentation isn't clear, which, of course,
      is why I'm submitting this bug report in the
      first place :-) ).
      (Review ID: 34885)
      ======================================================================

            peterz Peter Zhelezniakov
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: