Class MementoBasedUndoableEdit

    • Constructor Detail

      • MementoBasedUndoableEdit

        public MementoBasedUndoableEdit​(String description,
                                        Object mergeKey,
                                        org.jadice.util.base.Memento before,
                                        org.jadice.util.base.Memento after)
        Create a memento-based undoable edit from the given menentos and the description of the edit. If non-null, the merge key is used to determine mergeability of two memento-based undoable edits: if they have the same merge key, as merge is performed by replacing the old after-memento with the new after-memento.
        description - the description of the edit
        mergeKey - the merge key or null if this edit can never be merged with another one
        before - the before memento (used for undo)
        after - the after memento (used for redo)
    • Method Detail

      • tryMergeInto

        public boolean tryMergeInto​(UndoableEdit anEdit)
        Description copied from interface: UndoableEdit
        Determine whether the given edit can be merged into this edit. If it can, merge the edit and return true, otherwise do nothing and return false.
        anEdit - the edit that should possible be merged into this edit
        true if this edit could be merged, false otherwise
      • getDescription

        public String getDescription()
        Description copied from class: AbstractUndoableEdit
        Return a presentation name fragment suitable for use both in an "undo something" and "redo something" style phrase.
        Specified by:
        getDescription in class AbstractUndoableEdit
        a "something" fragment