Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » Using EMFResourceMappingMerger in core
Using EMFResourceMappingMerger in core [message #1745482] Tue, 11 October 2016 12:39 Go to next message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
Hi,

I am trying to detect conflicting changes between two models without modifying the files in which these models are serialized on the file system. In other words, I would like to perform this operation in core.

I am therefore using the following line of code to obtain a ResolveMerger instance:

ResolveMerger merger = (ResolveMerger) new StrategyRecursiveModel().newMerger(repo, true);


Notice that the inCore parameter of newMerger() is set to true.

When invoking the merge() method of this ResolveMerger instance, the call is eventually delegated to the merge() method of the EMFResourceMappingMerger class. This method always modifies the model files if it detects conflicts, effectively violating the contract of the newMerger(repo, true) call above by ignoring the value of the inCore parameter.

Is this apparent contract violation a bug?

And is there a way to use the EMFResourceMappingMerger without modifying any files on the file system?

Thanks in advance!
Re: Using EMFResourceMappingMerger in core [message #1745539 is a reply to message #1745482] Wed, 12 October 2016 09:39 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi,

The EMFResourceMappingMerger doesn't support in-memory operations for now. We do not know how hard it would be to support this kind of calls but this support isn't planned for inclusion in the foreseeable future as the focus of our development is on the merging itself. Please raise an enhancement request against EMF Compare on the eclipse bugzilla to report this limitation in case other people might be interested for this feature to be plannified in a future release. Feel free to contact Obeo if you are interested yourself in working on this issue together with us.

Laurent Goubet
Obeo
Re: Using EMFResourceMappingMerger in core [message #1745613 is a reply to message #1745539] Thu, 13 October 2016 11:23 Go to previous message
Vlad Acretoaie is currently offline Vlad AcretoaieFriend
Messages: 95
Registered: April 2014
Member
Hi Laurent,

Thank you for the answer. I will create an enhancement request, as you suggested.

Cheers,
Vlad
Previous Topic:Programmatically invoking a match engine
Next Topic:Determine if all conflicts have been resolved
Goto Forum:
  


Current Time: Fri Apr 26 23:39:21 GMT 2024

Powered by FUDForum. Page generated in 0.02926 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top