Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359586

Summary: Merge UML Association doesn't work
Product: [Modeling] EMFCompare Reporter: Vincent Lorenzo <vincent.lorenzo>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: cedric.brun, Dominique.Toupin, laurent.goubet, sebastien.gerard
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
This zip contains a model to reproduce easily the bug none

Description Vincent Lorenzo CLA 2011-09-30 12:12:51 EDT
steps to reproduce : 
	1/ Create a model with 2 classes and an association between these classes
	2/ Copy your uml file
	3/ Delete the association in one of the models
	4/ compare the 2 uml files : the merge action works fine when we delete the association, but not when we want create it in the 2nd file.
Comment 1 Vincent Lorenzo CLA 2011-09-30 12:14:14 EDT
Created attachment 204397 [details]
This zip contains a model to reproduce easily the bug

This zip contains a model to reproduce easily the bug decribed in the previous comment.
Comment 2 Laurent Goubet CLA 2012-03-06 05:52:24 EST
There is a dependency loop between the two differences "hidden" under the association change. EMF Compare cannot properly merge these and that is what ultimately causes the IllegalArgumentException that happens when trying to execute this merge operation.
Comment 3 Sébastien Gérard CLA 2012-03-14 10:37:45 EDT
Hi Laurent,

I did not understand your argument against the bug. For me in terms of usage it is a bug of UML compare/merge to nkow be able to merge an association from one model to another.
Can you explain in more detail what it is an issue?

thanks.
Comment 4 Cedric Brun CLA 2012-03-14 10:44:20 EDT
It is indeed a bug. Laurent's note is his analysis of the issue. To fix this we need to make sure we're able to handle cyclic dependencies during merging.
Comment 5 Sébastien Gérard CLA 2012-03-14 10:45:42 EDT
Ok thanks. But where does this cyclic dependency come from?
Comment 6 Cedric Brun CLA 2012-03-14 11:00:34 EDT
To merge (apply for instance) the Association instance the property has to be added too as the Association refers to the property instance. To add the property instance, this object having a reference to the Association, the association change needs to be applied too.
Comment 7 Laurent Goubet CLA 2012-06-04 04:40:57 EDT
This has been fixed along the way (probably through bug 379740) and we can no longer reproduce the issue on the two provided models.
Comment 8 Laurent Goubet CLA 2013-01-17 08:32:43 EST
batch-closing a bunch of "RESOLVED" bugs.