Java Code Examples for org.eclipse.xtext.ui.editor.XtextSourceViewer#Factory

The following examples show how to use org.eclipse.xtext.ui.editor.XtextSourceViewer#Factory . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContentAssistProcessorTestBuilder.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
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;
}
 
Example 2
Source File: ContentAssistProcessorTestBuilder.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
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;
}
 
Example 3
Source File: DotProposalProviderDelegator.java    From gef with Eclipse Public License 2.0 5 votes vote down vote up
private 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;
}
 
Example 4
Source File: XtendUiModule.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends XtextSourceViewer.Factory> bindSourceViewerFactory() {
	return RichStringAwareSourceViewer.Factory.class;
}
 
Example 5
Source File: GamlUiModule.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public Class<? extends XtextSourceViewer.Factory> bindSourceViewerFactory() {
	return GamaSourceViewerFactory.class;
}
 
Example 6
Source File: AbstractSARLUiModule.java    From sarl with Apache License 2.0 4 votes vote down vote up
public Class<? extends XtextSourceViewer.Factory> bindXtextSourceViewer$Factory() {
	return SARLSourceViewer.Factory.class;
}