This PR adds functionality for cleaning up and saving the UuidGeneratorAndResolverImpl while separating it from models resources and effects to them. In detail it provides the following:
Functionality for cleaning up removed elements in UuidGeneratorAndResolverImpl, i.e., removing elements that are not placed in a resource anymore, which is automatically executed on saving the instance.
Placement of the Uuid resource in a separate resource set, which was placed in the models' resource set before. This is useful because some Ecore functionality (such as EcoreUtil.delete) uses the cross referencer for a complete resource set, thus unintentionally affecting the UUID model. For example, calling EcoreUtil.delete on a model object will also remove it from the repository of the UUID resolver if placed in the same resource set. See also #441, for which this is a replacement. In addition, the resource in now managed within the UuidGeneratorAndResolverImpl (as it uses a separate resource set anyway).
Have the resource of the UuidGeneratorAndResolver automatically saved (and cleaned up on save) in the ResourceRepositoryImpl. This only possible because of element cleanup, as otherwise orphan elements without a resource prevent the serialization of the resource.
Proper implementation of load functionality for the UuidGeneratorAndResolverImpl, resolving the elements in the models' resource set. This also serves as a loading functionality for the model resources of a VirtualModel, such that storing them separately is not necessary. The UUID storage contains all necessary information about model resources to be loaded.
Addition of UUID test cases for element movement, element deletion, resolver cleanup and saving, as well as different loading scenarios.
This PR adds functionality for cleaning up and saving the
UuidGeneratorAndResolverImpl
while separating it from models resources and effects to them. In detail it provides the following:UuidGeneratorAndResolverImpl
, i.e., removing elements that are not placed in a resource anymore, which is automatically executed on saving the instance.EcoreUtil.delete
) uses the cross referencer for a complete resource set, thus unintentionally affecting the UUID model. For example, callingEcoreUtil.delete
on a model object will also remove it from the repository of the UUID resolver if placed in the same resource set. See also #441, for which this is a replacement. In addition, the resource in now managed within theUuidGeneratorAndResolverImpl
(as it uses a separate resource set anyway).UuidGeneratorAndResolver
automatically saved (and cleaned up on save) in theResourceRepositoryImpl
. This only possible because of element cleanup, as otherwise orphan elements without a resource prevent the serialization of the resource.UuidGeneratorAndResolverImpl
, resolving the elements in the models' resource set. This also serves as a loading functionality for the model resources of aVirtualModel
, such that storing them separately is not necessary. The UUID storage contains all necessary information about model resources to be loaded.Replaces and closes #441. Fixes #298.