Skip to main content



      Home
Home » Modeling » Compare » Determine if all conflicts have been resolved
Determine if all conflicts have been resolved [message #1745609] Thu, 13 October 2016 06:01 Go to next message
Eclipse UserFriend
How can I programmatically determine if the user has solved all conflicts in the EMF Compare UI, or there are still unsolved conflicts left? I am using EMF Compare as a plugin to an RCP application.

Thanks in advance!
Vlad
Re: Determine if all conflicts have been resolved [message #1745658 is a reply to message #1745609] Fri, 14 October 2016 03:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

You'll have to iterate on the conflicts to see if one is still in its "unresolved" state. You can do so through code such as this:

Predicate<Conflict> unresolvedConflict = new Predicate<Conflict>() {
	public boolean apply(Conflict conflict) {
		return conflict != null && conflict.getKind() != ConflictKind.PSEUDO && Iterables.any(conflict.getDifferences(), EMFComparePredicates.hasState(DifferenceState.UNRESOLVED));
	}
};
if (!Iterables.any(comparison.getConflicts(), unresolvedConflict)) {
	<no unresolved conflicts found>
}


Laurent Goubet
Obeo
Re: Determine if all conflicts have been resolved [message #1745685 is a reply to message #1745658] Fri, 14 October 2016 09:59 Go to previous message
Eclipse UserFriend
Hi Laurent,

Thank you for the help. That was exactly what I was looking for.

Cheers,
Vlad
Previous Topic:Using EMFResourceMappingMerger in core
Next Topic:using EMF Compare to compare Comparison objects
Goto Forum:
  


Current Time: Mon Jul 14 14:24:42 EDT 2025

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

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

Back to the top