Java 类org.eclipse.xtext.xtext.generator.DefaultGeneratorModule 实例源码

项目:xtext-core    文件:AntlrGeneratorFragmentTest.java   
protected void asserTranslatesToDebugGrammar(final CharSequence xtextGrammar, final String expectedDebugGrammar) {
  try {
    EObject _model = super.getModel(xtextGrammar.toString());
    final Grammar grammar = ((Grammar) _model);
    DefaultGeneratorModule _defaultGeneratorModule = new DefaultGeneratorModule();
    final Injector injector = Guice.createInjector(_defaultGeneratorModule);
    final AntlrGeneratorFragmentTest.InMemFSA inMem = new AntlrGeneratorFragmentTest.InMemFSA();
    final AntlrOptions options = new AntlrOptions();
    injector.<AntlrDebugGrammarGenerator>getInstance(AntlrDebugGrammarGenerator.class).generate(grammar, options, inMem);
    Assert.assertEquals(expectedDebugGrammar, IterableExtensions.<Object>head(inMem.getAllFiles().values()).toString());
  } catch (Throwable _e) {
    throw Exceptions.sneakyThrow(_e);
  }
}
项目:xtext-core    文件:XtextGenerator.java   
@Pure
public DefaultGeneratorModule getConfiguration() {
  return this.configuration;
}
项目:xtext-core    文件:XtextGenerator.java   
public void setConfiguration(final DefaultGeneratorModule configuration) {
  this.configuration = configuration;
}
项目:xtext-core    文件:WizardConfigTest.java   
@Before
public void createInjector() {
  DefaultGeneratorModule _defaultGeneratorModule = new DefaultGeneratorModule();
  this.injector = Guice.createInjector(_defaultGeneratorModule);
}