Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EMF Compare/Specifications/EditingTextualAttribute"

(Tests and Non-regression strategy)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Template:EMF Compare Archive Notice}}
 +
 
= Evolution Specification: Allow the editing of textual attribute  =
 
= Evolution Specification: Allow the editing of textual attribute  =
  
Current status is '''DRAFT'''
+
Current status is '''ARCHIVED'''
  
 
== Preamble  ==
 
== Preamble  ==
  
Often, when comparing textual attribute, neither the local nor the remote value is the one the user wants to
+
This feature enables to directly edit a local value on either side of a textual difference (on text field of an object).
keep. We will relax the read-only constraint on textual compare viewer. As soon as the left or the right side is
+
edited, the associated difference will be marked as rejected.
+
  
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=398083 Bug 398083] - Allow the edition textual attribute
 
*[https://bugs.eclipse.org/bugs/show_bug.cgi?id=398083 Bug 398083] - Allow the edition textual attribute
  
== Introduction  ==
 
  
TODO: This section should contain a summary of the proposed evolution, including why it is needed. Ideally it should be self-contained so that non-developers can get a quick overview of the evolution without reading the detailed specification.  
+
== Introduction ==
 +
 +
Often, when comparing textual attribute, neither the local nor the remote value is the one the user wants to keep. We will relax the read-only constraint on textual compare viewer. As soon as the left or the right side is edited, the associated difference will be marked as rejected.
 +
 
  
 
== Detailed Specification  ==
 
== Detailed Specification  ==
  
TODO: This section contains the "meat" of the document. Its structure will depend on the evolution itself, but it should contain:
+
On a textual difference, the user has to be able to edit his own value and, in this context, he will benefit from the features related to the text viewer like undo/redo mechanism during his editing session.
  
*a clear description of the objective, i.e. why the evolution is needed.
+
The models will be updated as soon as the user changes the input of the content merge viewer (on double-click on one of the structure viewer item), when he watches/handles an other difference or match. At the same time, the status of the "edited" difference will be set to REJECTED.
*a justification of the approach chosen. If other approaches were considered and rejected, document it for future reference.
+
*limits: things that are out of the scope of the evolution.
+
  
== Backward Compatibility and Migration Paths  ==
+
In the other contexts, undo/redo action will enable to retrieve old/new set values (by textual editing or merge actions).
  
=== Metamodel Changes ===
+
The save action shall set the current progressing textual editing in the model before serializing the data.
 +
 
 +
 
 +
== Backward Compatibility and Migration Paths ==
 +
 
 +
=== Metamodel Changes ===
  
 
This evolution does not change any metamodel.
 
This evolution does not change any metamodel.
  
=== API Changes ===
+
=== API Changes ===
  
 
This evolution required to get access to the change recorder from the editing domain (an accessor has been added to ICompareEditingDomain).
 
This evolution required to get access to the change recorder from the editing domain (an accessor has been added to ICompareEditingDomain).
  
=== User Interface Changes ===
+
=== User Interface Changes ===
  
 
For now, the user can edit his own value on a text field concerned by a difference, on a local model.
 
For now, the user can edit his own value on a text field concerned by a difference, on a local model.
  
=== Documentation Changes ===
+
=== Documentation Changes ===
  
TODO: List every documentation needing an update here, starting by the New and Noteworthy documentation.
+
This documentation will have to be updated:
 +
*New and Noteworthy
 +
*User guide
  
== Tests and Non-regression strategy  ==
 
  
A first step to test the feature here: [http://www.eclipse.org/emf/compare/doc/features/videos/Compare2/EditingText/editingText.htm video]
+
== Tests and Non-regression strategy ==
  
Found bugs:
+
A test case of the feature is presented here: [http://www.eclipse.org/emf/compare/doc/features/videos/Compare2/EditingText/editingText.htm video]
 +
 
 +
=== Found bugs ===
 +
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=398311 Bug 398311] - ChangeRecoder with EditingDomain
 
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=398405 Bug 398405] - The save action does not work in a content merge viewer different from TableContentMergeViewer
 
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=398405 Bug 398405] - The save action does not work in a content merge viewer different from TableContentMergeViewer
 
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=398503 Bug 398503] - No refresh of the Structure Merge Viewer after setting a textual value
 
* [https://bugs.eclipse.org/bugs/show_bug.cgi?id=398503 Bug 398503] - No refresh of the Structure Merge Viewer after setting a textual value
 +
  
 
== Implementation choices and tradeoffs  ==
 
== Implementation choices and tradeoffs  ==
  
TODO: Any important tradeoff or choice made during the implementation should be referenced here with pros/cons leading to the final decision.
+
During a textual editing session, it is possible to set each entered value in the model.
 +
 
 +
But, from the undo/redo mechanism viewpoint, it is not so relevant because each progressing step, during editing session, would be stored in the global command stack.
 +
So, this stack would be polluted by useless information, amongst other changed and set values coming from merges or textual editing actions.
  
[[Category:EMF Compare]]
+
Moreover, it would be needed to deactivate the local undo/redo mechanism on the text viewer because each undone or redone value would be set again and would modify this stack ! At last, the behavior would not be standard anymore and you should override the TextMergeViewer#configureTextViewer() method with your own configuration inheriting from SourceViewerConfiguration.

Latest revision as of 12:23, 5 March 2014

THIS PAGE IS ARCHIVED. IT IS PROBABLY OUTDATED AND WILL NOT BE UPDATED

Evolution Specification: Allow the editing of textual attribute

Current status is ARCHIVED

Preamble

This feature enables to directly edit a local value on either side of a textual difference (on text field of an object).


Introduction

Often, when comparing textual attribute, neither the local nor the remote value is the one the user wants to keep. We will relax the read-only constraint on textual compare viewer. As soon as the left or the right side is edited, the associated difference will be marked as rejected.


Detailed Specification

On a textual difference, the user has to be able to edit his own value and, in this context, he will benefit from the features related to the text viewer like undo/redo mechanism during his editing session.

The models will be updated as soon as the user changes the input of the content merge viewer (on double-click on one of the structure viewer item), when he watches/handles an other difference or match. At the same time, the status of the "edited" difference will be set to REJECTED.

In the other contexts, undo/redo action will enable to retrieve old/new set values (by textual editing or merge actions).

The save action shall set the current progressing textual editing in the model before serializing the data.


Backward Compatibility and Migration Paths

Metamodel Changes

This evolution does not change any metamodel.

API Changes

This evolution required to get access to the change recorder from the editing domain (an accessor has been added to ICompareEditingDomain).

User Interface Changes

For now, the user can edit his own value on a text field concerned by a difference, on a local model.

Documentation Changes

This documentation will have to be updated:

  • New and Noteworthy
  • User guide


Tests and Non-regression strategy

A test case of the feature is presented here: video

Found bugs

  • Bug 398311 - ChangeRecoder with EditingDomain
  • Bug 398405 - The save action does not work in a content merge viewer different from TableContentMergeViewer
  • Bug 398503 - No refresh of the Structure Merge Viewer after setting a textual value


Implementation choices and tradeoffs

During a textual editing session, it is possible to set each entered value in the model.

But, from the undo/redo mechanism viewpoint, it is not so relevant because each progressing step, during editing session, would be stored in the global command stack. So, this stack would be polluted by useless information, amongst other changed and set values coming from merges or textual editing actions.

Moreover, it would be needed to deactivate the local undo/redo mechanism on the text viewer because each undone or redone value would be set again and would modify this stack ! At last, the behavior would not be standard anymore and you should override the TextMergeViewer#configureTextViewer() method with your own configuration inheriting from SourceViewerConfiguration.

Back to the top