|Re: [EMF Compare] Is it possible to ignore the element order? [message #633084 is a reply to message #632564]
||Fri, 15 October 2010 10:05
| Patrick Konemann
Registered: July 2009
I had a similar issue and maybe this is or interest to you.
The comparisons I have contain a lot of order changes but I am not interested in them.
I'm calling EMF Compare programmatically, so I can access the computed diffmodel.
Before opening the compare UI for the user, I remove all order changes:
org.eclipse.emf.compare.mpatch.util.MPatchUtil.removeDiffEle mentOfType(snapshot.getDiff(), Collections.singleton(DiffPackage.Literals.REFERENCE_ORDER_C HANGE));
MPatchUtil is available in the CVS repository of EMF Compare, or I can post the method here if you like.
Hope it helps
On 13-10-2010 15:13, Jan Baart wrote:
> I'm trying to compare a refactored model to a specified target model using EMF Compare. This is working fine and as expected but I'd like to give the user an option to ignore re-ordered elements. Because the user has to manually create a target model this might be more convenient than making sure
> the elements have the same order as in the source model. However, it seems to me there is no way to make EMF Compare ignore the order.
> Am I just overlooking something or is this not possible? I noticed the papers mention a change of order as a basic possible difference between models but in certain cases, semantically, reordering is not a difference at all.
Powered by FUDForum
. Page generated in 0.02302 seconds