[528134] Make the reaction in case of conflict configurable

The implementation in EEFTextLifecycleManager uses a new preference
TEXT_CONFLICT_RESOLUTION_MODE, which is not exposed in the UI but can
be configured programmatically using EEFPreferences.setTextConflictResolutionMode().

The default preference value can also be overridden by configuration,
using the -pluginCustomization startup flag to point to a
plugin_customization.ini file with, for example:

org.eclipse.eef.ide.ui/TEXT_CONFLICT_RESOLUTION_MODE=USE_LOCAL_VERSION

EEFTextLifecycleManager supports three modes:
* USE_MODEL_VERSION: overwrite the widget's content with the value
  computed from the new version of the model (no user feedback). This
  is the default.
* USE_LOCAL_VERSION: keep the current value begin edited by the
  end-user in the widget (no user feedback);
* ASK_USER: open a simple dialog box to ask the user which version to
  keep. Note that the simple dialog provided is only suitable for
  short (single-line) text fields.

Conflict resolution can further be customized by providing a custom
LifecycleManager which extends the default EEFTextLifecycleManager and
overrides either:
* askUserToResolveConflict() to take the preference in consideration,
  but implement ASK_USER differently, for example with a more
  sophisticated dialog.
* resolveEditionConflict() to provide a completely different
  strategy (possibly ignoring the preference).

Bug: 528134
Change-Id: I55527d2ceb31b691c4c3d5a63f72f21a6bc5643c
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
4 files changed
tree: 9e4a2212b4674ad23dd57765e648030252889da8
  1. doc/
  2. features/
  3. plugins/
  4. prototypes/
  5. releng/
  6. samples/
  7. tests/
  8. .gitignore