How can I open an Eclipse CompareEditor inside a View?

More specifically, I want the view to contain a SashForm. In the left sash I put some information about the commit, and in the right sash I want to put a compare editor that compares the commit to its parent. Is there such a thing even possible?

I've succeeded in using a GitCompareEditorInput from eGit and the CompareUI class to open a separate compare editor or a dialog with the compare editor (that compares a certain commit to its parent). But now I am interested in putting that compare editor inside another view, as detailed above.


Update: I have tried CompareEditorInput.createContents(compositeParent) but I only get two empty rectangles.

No correct solution


The key to hosting a CompareEditorInput class appears to be providing a class which implements Once you have this you connect it to the input using CompareEditorInput.setContainer(container). provides a partial implementation of the container but this is internal so should only be used as a guide rather than used directly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow