|Re: DiffHelper or similar? [message #912947 is a reply to message #911931]
||Fri, 14 September 2012 09:07
| Laurent Goubet
Registered: July 2009
In EMF Compare 1.3, you will have to iterate over the list of differences and locate the diff you seek yourself, we did not provide any implementation that allows for easier lookup in the list.
In EMF Compare 2.0, you can use EMFComparePredicates to lookup a little more easily. For example, if you're comparing ecore models (or any other that has a feature "name"), you can use something like :
Predicate<? super Diff> predicate = removedFromReference("extlibrary.Periodical", "eSuperTypes", "extlibrary.Item");
Diff diff = Iterables.find(difference, predicate);
to find the diff corresponding to the removal of "Item" from the reference "eSuperTypes" of "Periodical". There are various examples of how we use the predicates in the unit tests of EMF Compare.
Powered by FUDForum
. Page generated in 0.01446 seconds