Make sure the factories are not kept around as singleton instances

Change-Id: I3c67b70a5498fc94e9df8900b1e969e15cfeb43e
Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr>
Don't unload resources, even for UML. Just clear out the eAdapters.

This will avoid the cost of proxification, the potential leaks it
induces through CacheAdapter#inverseCrossReferencer#proxyMap and it
allows to remove the adapters that may have been on "generic" resources
while removing the need for an UML-specific unload hook.

Change-Id: I28693f5e01d416d737350c0338718f2985b08ef3
Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr>
Only care for containment proxies when resolving the dependency graph

Prevents the UML CacheAdapter from doing too much unneeded work
(unneeded since we're going to dispose of that resource as soon as we
know about its cross-references).

Change-Id: I9c9127678efc61bb072b8d2339e34a1a4217861e
Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr>
Use demandCreate instead of explicitly creating the resource

Bug: 437507
Change-Id: If194745d6ff1fd4dd05b18d02a3a1256f4a19d59
Signed-off-by: Laurent Goubet <laurent.goubet@obeo.fr>
[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>
[451365] Adds specific accessors for OpaqueElementBodyChanges

For moves of language/body values, we show the list of languages in the
order of each side. For additions, changes, and deletions, we show the
added, deleted, or changed body value using a textual content merge
viewer.

Therefore, we add two separate accessors
(OpaqueElementBodyChangeAccessor and OpaqueElementBodyMoveAccessor),
which are created by the OpaqueElementBodyChangeAccessorFactory
depending on the opaque element body change's difference kind.

Bug: 451365
Change-Id: I05aa142475357896e0303687171babab835ee719
Signed-off-by: Philip Langer <planger@eclipsesource.com>
[455677] Fixes insertion index of opaque element body values additions

Instead of relying on the DiffUtil.findInsertionIndex, which finds the
insertion index on a best effort basis and does not know about the
connection between language and body values, we now ensure that we
always merge the language value first and then select the insertion
index for the body value based on the index of the already merged
language value.

Bug: 455677
Change-Id: Icf3ff278e9ec55f2fc9440f537459d73d7267bb6
Signed-off-by: Philip Langer <planger@eclipsesource.com>