문제

When a text conflict occurs in Bazaar (and many other dvcs) a .BASE, .THIS and .OTHER file is produced. Its then up to the user to make use of an 3 way merge tool to merge the conflict and then mark it as resolved.

I would like to get hold of all the registered merge viewers in eclipse and give the user an option to merge the conflict with any one of these. (with the TextMergeViewer being an default option). I suspect that I would need to some how programmatically provide the 3 files to these mergeviewers and maybe write some custom code to wrap the BASE, THIS and OTHER files to tell the merge viewer where the differences are. (interpret the "herringbone" markers like <<<<<<<. etc)

도움이 되었습니까?

해결책

Not exactly an answer, but at least some starting points:

You could try looking into the code of the current Compare Viewer using the Plug-in Spy (directly available with eclipse3.5)

alt text
(source: eclipse.org)

(ALT+SHIFT+F1)

Most of the eclipse sources are also available here.
The org.eclipse.compare.CompareUI is a start, for example.

Once you have a basic understanding of how the Compare mechanism works as a plugin, you can write an fragment (also illustrated here) to extend the current compare plugin.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top