[451365] Removes conflicts and implications of refining diffs21/38221/4
commit5016eb9d200d10aca122f4b83830761ec636979a
authorPhilip Langer <planger@eclipsesource.com>
Fri, 12 Dec 2014 10:51:59 +0000 (12 11:51 +0100)
committerAxel RICHARD <axel.richard@obeo.fr>
Fri, 19 Dec 2014 14:34:46 +0000 (19 09:34 -0500)
treef7a1d7a0490dc106bce291773489c13dcb51a0f4
parent023d89a80eeaf050c07560b734b58c38bbd247b2
[451365] Removes conflicts and implications of refining diffs

The AbstractChangeFactory propagates conflicts from refining diffs to
refined diffs. For OpaqueElementBodyChanges there is a specific conflict
detection, so conflicts of refining changes are not relevant.
Especially, since the typcial refining diffs often have pseudo
conflicts. If these pseudo conflicts are then propagated to the
OpaqueElementBodyChanges, they will be filtered in the structured diff
viewer.

To address this issue, we now remove all propagated conflicts from
OpaqueElementBodyChanges.

Also, we used the implies relationship to make sure that the refining
changes are handled when the OpaqueElementBodyChanges is merged.
However, this had implications on the user interface of the structure
merge viewer.

To address this issue, we removed those implications but now we have to
remove the refining diffs from the merge dependencies; otherwise, when
the opaque element body change is merged, AbstractMerger would first
invoke the merge of the refining diffs as they are considered as merge
dependencies, which causes the merge of the entire
OpaqueElementBodyChange anyway, and then pursue the merge of the
OpaqueElementBodyChange, so that it would ultimately be performed twice.
Therefore, we remove the refining diffs from the merge dependencies by
overriding #getDirectmergeDependencies(Diff, boolean).

Bug: 451365
Change-Id: Ib61e2564665f83c9d076293706df63e024b29e63
Signed-off-by: Philip Langer <planger@eclipsesource.com>
plugins/org.eclipse.emf.compare.uml2.tests/src/org/eclipse/emf/compare/uml2/tests/opaque/OpaqueElementBodyChangeMergeTest.java
plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/internal/merge/OpaqueElementBodyChangeMerger.java
plugins/org.eclipse.emf.compare.uml2/src/org/eclipse/emf/compare/uml2/internal/postprocessor/extension/UMLOpaqueElementBodyChangeFactory.java