use of org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback in project xtext-eclipse by eclipse.
the class DefaultMergeViewer method createSourceViewer.
@Override
protected SourceViewer createSourceViewer(Composite parent, int textOrientation) {
if (getSite() != null) {
if (sourceViewerEditorMap == null) {
sourceViewerEditorMap = Maps.newHashMapWithExpectedSize(3);
}
DefaultMergeEditor mergeEditor = createMergeEditor();
mergeEditor.setXtextEditorCallback(new CompoundXtextEditorCallback(null));
mergeEditor.setTextOrientation(textOrientation);
mergeEditor.setInternalSite(getSite());
mergeEditor.createPartControl(parent);
SourceViewer internalSourceViewer = (SourceViewer) mergeEditor.getInternalSourceViewer();
sourceViewerEditorMap.put(internalSourceViewer, mergeEditor);
return internalSourceViewer;
}
return super.createSourceViewer(parent, textOrientation);
}
Aggregations