org.eclipse.xtext.formatting2.regionaccess.TextRegionAccessBuilder Java Examples
The following examples show how to use
org.eclipse.xtext.formatting2.regionaccess.TextRegionAccessBuilder.
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: Serializer.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
public ITextRegionAccess serializeToRegions(EObject obj) { checkNotNull(obj, "obj must not be null."); ISerializationContext context = getIContext(obj); TextRegionAccessBuilder builder = textRegionBuilderProvider.get(); ISerializationDiagnostic.Acceptor errors = ISerializationDiagnostic.EXCEPTION_THROWING_ACCEPTOR; serialize(context, obj, builder.forSequence(context, obj), errors); ITextRegionAccess regionAccess = builder.create(); return regionAccess; }
Example #2
Source File: FormatterXpectMethod.java From n4js with Eclipse Public License 1.0 | 4 votes |
/***/ public TextRegionAccessFactory(@ThisResource XtextResource resource) { TextRegionAccessBuilder builder = resource.getResourceServiceProvider().get(TextRegionAccessBuilder.class); regionAccess = builder.forNodeModel(resource).create(); }