@Override protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) { if (log.isDebugEnabled()) log.debug("Creating Xtext source viewer."); // overwrite superclass implementation to allow folding fAnnotationAccess = createAnnotationAccess(); fOverviewRuler = createOverviewRuler(getSharedColors()); ISourceViewer projectionViewer = sourceViewerFactory.createSourceViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles); getSourceViewerDecorationSupport(projectionViewer); return projectionViewer; }
annotationRuler = null; final XtextSourceViewer viewer = this.sourceViewerFactory.createSourceViewer( parent, annotationRuler,
protected ISourceViewer getSourceViewer(Shell shell, final IXtextDocument xtextDocument, XtextSourceViewerConfiguration configuration) { XtextSourceViewer.Factory factory = get(XtextSourceViewer.Factory.class); ISourceViewer sourceViewer = factory.createSourceViewer(shell, null, null, false, 0); sourceViewer.configure(configuration); sourceViewer.setDocument(xtextDocument); return sourceViewer; }
protected ISourceViewer getSourceViewer(Shell shell, final IXtextDocument xtextDocument, XtextSourceViewerConfiguration configuration) { XtextSourceViewer.Factory factory = get(XtextSourceViewer.Factory.class); ISourceViewer sourceViewer = factory.createSourceViewer(shell, null, null, false, 0); sourceViewer.configure(configuration); sourceViewer.setDocument(xtextDocument); return sourceViewer; }