I started solving this problem with a very similar aproach. Calling mergeAlgorithm.merge() to produce the merge result. But: why should we do a full-fledged merge which does two complicated diffs (ok - one diff is not so complicated because one text is empty) although we know exactly what the merge result should look like. If OURS is the modified version and THEIRS is deleted then we expect a conflict like that:

>>>> OURS
<complete content of OUR's>
==== THEIRS
<<<<<

My idea is to create such a mergeresult manually which is much faster than calling the merger.

The more I think about it: Let's put this optimization into the mergealgorithm itself. I'll make a proposal for that. Then this code here can stay.