|
|
Re: [EMF Compare] Is it possible to ignore the element order? [message #633048 is a reply to message #632643] |
Fri, 15 October 2010 08:19 |
|
Hi Jan,
As Ed mentionned, we only consider "order" important if you defined it as such in your metamodel. We do not, however, provide a way for the user to ignore order changes in ordered references.
You'll need to open your meta model, select the reference where order isn't important, open its properties (right click => show properties view) and set "ordered" to "false" for EMF Compare to ignore it.
Laurent Goubet
Obeo
|
|
|
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 Messages: 116 Registered: July 2009 |
Senior Member |
|
|
Hi Jan,
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
Patrick
On 13-10-2010 15:13, Jan Baart wrote:
> Hi,
>
> 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.
>
> thanks
>
> Jan
|
|
|
Powered by
FUDForum. Page generated in 0.04176 seconds