Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF Diff/Merge » Incremental mode and delete element
Incremental mode and delete element [message #1741997] Fri, 26 August 2016 13:04 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 263
Registered: December 2015
Senior Member
Hi,

I have a custom comparison where it happens that incremental mode is set
to true. I now compare two models that are almost equal. The sole
difference is that the 'left' model has an additional element. When I
now select "X" to delete that element on the left, a dialog pops up with
"No differences to merge".

I figured that the cause is in ComparisonViewer line 204ff:

if (!incrementalMode_p || difference instanceof IPresenceDifference &&
((IPresenceDifference)difference).getPresenceRole() !=
destination_p)
toMerge_p.add(difference);
}

So if incremental mode is enabled, I cannot delete elements? Can you
explain where incremental mode is useful? I don't see the point.

Thanks,
Felix
Re: Incremental mode and delete element [message #1742098 is a reply to message #1741997] Wed, 31 August 2016 12:16 Go to previous messageGo to next message
Olivier Constant is currently offline Olivier ConstantFriend
Messages: 91
Registered: January 2012
Member
Hi Felix,

That's it: given an arbitrary selection in the GUI, the incremental mode allows merging the related differences that do not (directly) delete information.

Let's say you want to reconcile the work done by two people in parallel. You could start with the model provided by one of the two and classically go through the changes made by the other one. But you could also adopt a faster, more optimistic approach that consists in considering that all the non-destructive work done by the other person should be integrated, because it is not harmful anyway, and that only deletions should be considered with care. So you would first merge all differences in incremental mode, then go through the remaining differences.
Re: Incremental mode and delete element [message #1742614 is a reply to message #1742098] Tue, 06 September 2016 07:39 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 263
Registered: December 2015
Senior Member
Ok I see.. I managed to create an example where this made some sense. But here's an odd case: So let's say default incremental mode is true and the user selects a single element presence and clicks on the 'X' to delete the presence. The result is a dialog "No differences to merge". (Actually that's how I found out about incremental mode..)
Re: Incremental mode and delete element [message #1742655 is a reply to message #1742614] Tue, 06 September 2016 12:28 Go to previous message
Olivier Constant is currently offline Olivier ConstantFriend
Messages: 91
Registered: January 2012
Member
Indeed. I'm not sure how to provide a better feedback to the user... Any idea is welcome. Smile
Previous Topic:Undo and Redo operation in Diff/Merge
Next Topic:Implied vs Explicit dependencies
Goto Forum:
  


Current Time: Thu May 24 21:10:29 GMT 2018

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

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

Back to the top