Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Compare » DiffHelper or similar?
DiffHelper or similar? [message #911931] Wed, 12 September 2012 15:56 Go to next message
Stacey Hopkins is currently offline Stacey HopkinsFriend
Messages: 34
Registered: March 2012
Member
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 13:07 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
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 Sep 25 19:02:18 GMT 2024

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

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

Back to the top