Search in sources :

Example 1 with Serializer

use of org.eclipse.xtext.parsetree.reconstr.Serializer in project xtext-core by eclipse.

the class XtextFormatterTest method _testXtextXtext.

public void _testXtextXtext() {
    Serializer serializer = get(Serializer.class);
    IGrammarAccess grammar = get(IGrammarAccess.class);
    SaveOptions opt = SaveOptions.newBuilder().format().getOptions();
    System.out.println(serializer.serialize(grammar.getGrammar(), opt));
}
Also used : IGrammarAccess(org.eclipse.xtext.IGrammarAccess) SaveOptions(org.eclipse.xtext.resource.SaveOptions) Serializer(org.eclipse.xtext.parsetree.reconstr.Serializer)

Aggregations

IGrammarAccess (org.eclipse.xtext.IGrammarAccess)1 Serializer (org.eclipse.xtext.parsetree.reconstr.Serializer)1 SaveOptions (org.eclipse.xtext.resource.SaveOptions)1