Skip to main content



      Home
Home » Modeling » Compare » DiffHelper or similar?
DiffHelper or similar? [message #911931] Wed, 12 September 2012 11:56 Go to next message
Eclipse UserFriend
I've noted the following (link below) in the developer guide.... has this been implemented? Or something similar?

http://wiki.eclipse.org/EMF_Compare/Developer_Guide#Merging_the_differences
Re: DiffHelper or similar? [message #912947 is a reply to message #911931] Fri, 14 September 2012 09:07 Go to previous message
Eclipse UserFriend
Hi,

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.

Laurent Goubet
Obeo
Previous Topic:[EMF Compare] Moving items bug or by design?
Next Topic:Merging Models with Extended Types
Goto Forum:
  


Current Time: Wed Jul 23 13:49:31 EDT 2025

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

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

Back to the top