org.eclipse.xtext.parser.antlr.AbstractAntlrParser Java Examples

The following examples show how to use org.eclipse.xtext.parser.antlr.AbstractAntlrParser. 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: PartialParsingHelperIssue219Test.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Test
public void testIssue219() throws Exception {
	with(PartialParserTestLanguageStandaloneSetup.class);
	String model = "container c1 {\n" + "  children {\n" + "-> C ( ch1 )\n" + "  }" + "}";
	XtextResource resource = getResourceFromString(model);
	assertTrue(resource.getErrors().isEmpty());
	((PartialParsingHelper) ((AbstractAntlrParser) resource.getParser()).getPartialParser())
			.setTokenRegionProvider(null);
	resource.update(model.indexOf("ch1") + 1, 1, "x");
}