Search in sources :

Example 1 with IMergeViewerContentProvider

use of org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider in project whole by wholeplatform.

the class ModelMergeViewer method refresh.

protected void refresh(Object input) {
    IMergeViewerContentProvider contentProvider = getContentProvider();
    if (contentProvider != null && input != null) {
        readSideModel(MergeSide.ANCESTOR, contentProvider.getAncestorContent(input), contentProvider.getAncestorLabel(input));
        readSideModel(MergeSide.LEFT, contentProvider.getLeftContent(input), contentProvider.getLeftLabel(input));
        readSideModel(MergeSide.RIGHT, contentProvider.getRightContent(input), contentProvider.getRightLabel(input));
        setDirty(false);
        IBindingManager bm = BindingManagerFactory.instance.createArguments();
        BehaviorUtils.apply("whole:org.whole.lang.changes:RevisionsLibrarySemantics#compare", viewer.getEntityContents(), bm);
    // viewer.rebuildNotation();
    }
}
Also used : IBindingManager(org.whole.lang.bindings.IBindingManager) IMergeViewerContentProvider(org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider)

Example 2 with IMergeViewerContentProvider

use of org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider in project xtext-eclipse by eclipse.

the class DefaultMergeViewer method disconnectDocuments.

protected void disconnectDocuments() {
    IMergeViewerContentProvider contentProvider = (IMergeViewerContentProvider) getContentProvider();
    Object ancestorContent = contentProvider.getAncestorContent(getInput());
    Object leftContent = contentProvider.getLeftContent(getInput());
    Object rightContent = contentProvider.getRightContent(getInput());
    documentProvider.disconnect(inputObjectStreamContentAccessorMap.get(ancestorContent));
    documentProvider.disconnect(inputObjectStreamContentAccessorMap.get(leftContent));
    documentProvider.disconnect(inputObjectStreamContentAccessorMap.get(rightContent));
}
Also used : IMergeViewerContentProvider(org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider)

Aggregations

IMergeViewerContentProvider (org.eclipse.compare.contentmergeviewer.IMergeViewerContentProvider)2 IBindingManager (org.whole.lang.bindings.IBindingManager)1