public void initialize() { if ((this.injector == null)) { XtextGenerator.LOG.info("Initializing Xtext generator"); new StandaloneSetup().addRegisterGeneratedEPackage("org.eclipse.xtext.common.types.TypesPackage"); this.initializeEncoding(); this.injector = this.createInjector(); this.injector.injectMembers(this); CodeConfig _instance = this.injector.<CodeConfig>getInstance(CodeConfig.class); final Procedure1<CodeConfig> _function = (CodeConfig it) -> { it.initialize(this.injector); }; ObjectExtensions.<CodeConfig>operator_doubleArrow(_instance, _function); this.projectConfig.initialize(this.injector); this.cleaner.initialize(this.injector); this.standaloneSetup.initialize(this.injector); for (final XtextGeneratorLanguage language : this.languageConfigs) { { final Injector languageInjector = this.createLanguageInjector(this.injector, language); language.initialize(languageInjector); } } } }
private CodeConfig createCodeConfig() { CodeConfig _codeConfig = new CodeConfig(); final Procedure1<CodeConfig> _function = (CodeConfig it) -> { it.setLineDelimiter(this.naming.getLineDelimiter()); it.setFileHeader(this.naming.fileHeader()); }; return ObjectExtensions.<CodeConfig>operator_doubleArrow(_codeConfig, _function); }
@Override public void generate(final Xtend2ExecutionContext ctx) { final SerializerFragment2 delegate = new SerializerFragment2(); delegate.setGenerateStub(this.isGenerateStub()); delegate.setDetectSyntheticTerminals(this.detectSyntheticTerminals); delegate.setGenerateDebugData(this.generateDebugData); delegate.setGenerateSupportForDeprecatedContextEObject(this.generateSupportForDeprecatedContextEObject); CodeConfig _instance = this.adapterSetup.getInjector().<CodeConfig>getInstance(CodeConfig.class); _instance.setPreferXtendStubs(this.isGenerateXtendStub()); delegate.initialize(this.adapterSetup.getInjector()); delegate.generate(); }
protected JavaFileAccess(final TypeReference typeRef, final CodeConfig codeConfig) { int _length = ((Object[])Conversions.unwrapArray(typeRef.getSimpleNames(), Object.class)).length; boolean _greaterThan = (_length > 1); if (_greaterThan) { throw new IllegalArgumentException(("Nested type cannot be serialized: " + typeRef)); } this.javaType = typeRef; this.codeConfig = codeConfig; String _path = typeRef.getPath(); String _plus = (_path + "."); String _fileExtension = this.getFileExtension(); String _plus_1 = (_plus + _fileExtension); this.setPath(_plus_1); }
@Pure protected CodeConfig getCodeConfig() { return this.codeConfig; }
@Pure public CodeConfig getCodeConfig() { return this.codeConfig; }
public void setCodeConfig(final CodeConfig codeConfig) { this.codeConfig = codeConfig; }
protected XtendFileAccess(final TypeReference typeRef, final CodeConfig codeConfig) { super(typeRef, codeConfig); }
protected GeneratedJavaFileAccess(final TypeReference typeRef, final CodeConfig codeConfig) { super(typeRef, codeConfig); }
public void configureCodeConfig(final Binder binder) { binder.<CodeConfig>bind(CodeConfig.class).toInstance(this.code); }
@Pure public CodeConfig getCode() { return this.code; }
public void setCode(final CodeConfig code) { this.code = code; }