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

RFE: provide implementation for StateEdit.isSignificant()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.0
    • client-libs



      Name: rmT116609 Date: 08/16/2002


      FULL PRODUCT VERSION :
      java version "1.4.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
      Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

      FULL OPERATING SYSTEM VERSION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      (In the following all classes are in the javax.swing.undo package)

      The super class of StateEdit (AbstractUndoableEdit) has a method called isSignificant() that always returns true.

      CompoundEdit (also a subclass of AbstractUndoableEdit) overrides this method to return true only if one of it's UndoableEdits returns true. In this case isSignificant() returns true only if there is any changes made (provided that the edits only return true for isSignificant() if any edits took place).

      For StateEdit this is not true since the method isn't overloaded and therefore returns true even if no edit took place, i.e. when pre-edit and post-edit states are identical.

      My request is that StateEdit overloads UndoableEdit.isSignificant() to return true if and only if the pre-edit and post-edit states are non-identical.
      isSignificant() can then be used to check if any edits took place or if the object is unchanged.

      If this usage isn't the intended usage of isSignificant() the documentation should be updated.

      (Review ID: 160869)
      ======================================================================

            peterz Peter Zhelezniakov
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: