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

Bug 346602

Summary: ResourceDependencyChange references resources in the wrong direction
Product: [Modeling] EMFCompare Reporter: Mikaël Barbero <mikael.barbero>
Component: CoreAssignee: EMF Compare <emf.compare-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet, mikael.barbero
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Mikaël Barbero CLA 2011-05-20 04:26:56 EDT
There is a bug in the direction of the dependency changes. Added dependencies are marked as removed and vice versa.

The bug is located in the static method: DiffResourceSet DiffService#doDiff(MatchResourceSet, boolean)

== before ==

if (unmatch.getSide() == Side.LEFT) {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeRightTarget();
} else {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeLeftTarget();
}

== after ==

if (unmatch.getSide() == Side.LEFT) {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeLeftTarget();
} else {
	dependencyChange = DiffFactory.eINSTANCE.createResourceDependencyChangeRightTarget();
}
Comment 1 Laurent Goubet CLA 2011-05-23 08:48:53 EDT
This is a regression ... dating back all the way to 2009 :S. This trivial fix will be available in RC2.