[521948] Support changing the state of diffs already in terminal state

We can make use of the change recorder to determine which diffs have
changed state because of a command.  We can undo the stack until the
diff(s) on which we operate are no longer in a terminal state and can
execute a command to change them. We can preserve manual edits from a
textual compare if these too use the common command implementation.

In a textual compare, we can delay the process of character-by-character
changes and can fold multiple edits into a single command on the command
stack.

The undoing and redoing of commands should not update the UI, so the
command stack implementation support suspending notification.

Also, to avoid undesirable selection of the affected object after an
execute, the command stack implementation supports more informative
command events.

The views should always be refreshed after a command, including the
properties view (which we must do carefully to avoid dismissing the cell
editor).

Commands executed directly on a side stack, e.g., from the properties
view should be reflected into the overall command stack.  But such
commands cannot be played back; therefore, the user is warned if this
will happen and can choose to proceed or to abort.

The merge actions should be disabled if the diff state wouldn't be
changed by the action (and for an empty selection).

This change also fixes a minor problem with lack of notification.

If you change a text value feature and then change it back to the
original value, the edit command can't execute, because it doesn't need
to do anything, and then the command stack doesn't produce a
notification when delivery is re-enabled. This leaves the undo action in
an inconsistent state and leaves the editor dirty.

Bug: 521948
Change-Id: I66e1986f6daa4572428b92781cfa34adb4ac72c9
Signed-off-by: Philip Langer <planger@eclipsesource.com>
13 files changed