|
Re: Merging file deletions in multi-file model [message #1750452 is a reply to message #1750359] |
Wed, 21 December 2016 08:49 |
|
Hi Vlad,
EMF Compare supports multi-file models, including moves across model files, deletions of model files on the local or remote side, etc. (see ResourceAttachmentChange). But so for, I only used this multi-file functionality together with EGit and the recursive model merge strategy in the EGit preferences. The model resolution preference should then be set accordingly, depending on how your models are structured. E.g., whether all connected models are in one project (project scope) or are distributed across multiple projects (workspace scope), etc.
I have never tried to support this use case outside of EGit. It should be doable, but may require some additional implementation. You might also want to have a look at the EMFResourceMappingMerger, which implements the multi-file merge based on the the Eclipse Team API.
Best wishes,
Philip
--
Philip Langer
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
--
Philip Langer
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
[Updated on: Wed, 21 December 2016 08:50] Report message to a moderator
|
|
|
|
Re: Merging file deletions in multi-file model [message #1750926 is a reply to message #1750460] |
Mon, 02 January 2017 09:42 |
|
Hi Vlad,
Quote:1. What is the relationship between the EMFResourceMappingMerger and the RecursiveModelMerger classes? I am currently using the RecursiveModelMerger to detect if there are any conflicts (I only want to start the comparison editor if conflicts are detected). But it seems like the comparison editor somehow invokes the EMFResourceMappingMerger by default.
The recursive model merger considers "model providers" (org.eclipse.emf.compare.model.provider) during the merge and EMF Compare registers a model provider for EMF models (EMFModelProvider). For merging "models" provided by such providers, the provider is adapted to a IResourceMappingMerger. EMFModelProvider adapts to EMFResourceMappingMerger. Thus, EMFResourceMappingMerger is responsible for merging EMF models as provided by the EMFModelProvider through the extension org.eclipse.emf.compare.model.provider.
Quote:2. What do you mean when you say "the model resolution preference should then be set accordingly"? Is there a set of model resolution preferences that can be configured?
Yes, please look at EMF Compare -> Resolution Strategy, where you can configure the scope of the model resolution. This model resolution will be considered when resolving the connected model resources provided by the EMFModelProvider.
Hope that helps,
Philip
--
Philip Langer
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
--
Philip Langer
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03858 seconds