Java Code Examples for org.eclipse.xtext.xtext.generator.model.GuiceModuleAccess#BindingFactory
The following examples show how to use
org.eclipse.xtext.xtext.generator.model.GuiceModuleAccess#BindingFactory .
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: ValidatorFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.14 */ protected void contributeRuntimeGuiceBindings() { final GuiceModuleAccess.BindingFactory bindingFactory = new GuiceModuleAccess.BindingFactory(); bindingFactory.addTypeToTypeEagerSingleton(this._validatorNaming.getValidatorClass(this.getGrammar()), this._validatorNaming.getValidatorClass(this.getGrammar())); if ((this.generateDeprecationValidation || this.generatePropertyPage)) { bindingFactory.addTypeToType(this.getSuperConfigurableIssueCodesProviderClass(), this.getConfigurableIssueCodesProviderClass()); } bindingFactory.contributeTo(this.getLanguage().getRuntimeGenModule()); }
Example 2
Source File: ValidatorFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.14 */ protected void contributePluginGuiceBindings() { if ((this.generateDeprecationValidation || this.generatePropertyPage)) { final GuiceModuleAccess.BindingFactory bindingFactory = new GuiceModuleAccess.BindingFactory(); bindingFactory.addTypeToType(this.getAbstractValidatorConfigurationBlockClass(), this.getValidatorConfigurationBlockClass()); bindingFactory.contributeTo(this.getLanguage().getEclipsePluginGenModule()); } }
Example 3
Source File: GrammarAccessFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void generate() { final GuiceModuleAccess.BindingFactory bindingFactory = new GuiceModuleAccess.BindingFactory(); String _name = this.getLanguage().getGrammar().getName(); boolean _notEquals = (!Objects.equal(_name, "org.eclipse.xtext.common.Terminals")); if (_notEquals) { TypeReference _typeRef = TypeReference.typeRef(ClassLoader.class); StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { _builder.append("getClass().getClassLoader()"); } }; bindingFactory.addTypeToInstance(_typeRef, _client); } bindingFactory.addTypeToType(TypeReference.typeRef(IGrammarAccess.class), this._grammarAccessExtensions.getGrammarAccess(this.getLanguage().getGrammar())).contributeTo(this.getLanguage().getRuntimeGenModule()); ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { String _runtimeBasePackage = this._xtextGeneratorNaming.getRuntimeBasePackage(this.getGrammar()); String _runtimeBasePackage_1 = this._xtextGeneratorNaming.getRuntimeBasePackage(this.getGrammar()); String _plus = (_runtimeBasePackage_1 + ".services"); this.getProjectConfig().getRuntime().getManifest().getExportedPackages().addAll( Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(_runtimeBasePackage, _plus))); } this.doGenerateGrammarAccess(); this.writeGrammar(); }
Example 4
Source File: ResourceDescriptionStrategyFragment.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected void contributeRuntimeGuiceBindings() { final GuiceModuleAccess.BindingFactory bindingFactory = new GuiceModuleAccess.BindingFactory(); if ((this.isGenerateStub() || this.isGenerateXtendStub())) { bindingFactory.addTypeToType(TypeReference.typeRef(IDefaultResourceDescriptionStrategy.class), this.getStubResourceDescriptionStrategyClass()); } else { bindingFactory.addTypeToType(TypeReference.typeRef(IDefaultResourceDescriptionStrategy.class), this.getDefaultResourceDescriptionStrategyClass()); } bindingFactory.contributeTo(this.getLanguage().getRuntimeGenModule()); }
Example 5
Source File: OutlineTreeProviderFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void generate() { ManifestAccess _manifest = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { Set<String> _requiredBundles = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles(); _requiredBundles.add("org.eclipse.xtext.ui"); } boolean _isGenerateStub = this.isGenerateStub(); boolean _not = (!_isGenerateStub); if (_not) { return; } IXtextGeneratorFileSystemAccess _src = this.getProjectConfig().getEclipsePlugin().getSrc(); boolean _tripleNotEquals_1 = (_src != null); if (_tripleNotEquals_1) { boolean _isGenerateXtendStub = this.isGenerateXtendStub(); if (_isGenerateXtendStub) { this.generateXtendOutlineTreeProvider(); } else { this.generateJavaOutlineTreeProvider(); } } GuiceModuleAccess.BindingFactory _bindingFactory = new GuiceModuleAccess.BindingFactory(); TypeReference _typeReference = new TypeReference("org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider"); GuiceModuleAccess.BindingFactory _addTypeToType = _bindingFactory.addTypeToType(_typeReference, this.getOutlineTreeProviderClass(this.getGrammar())); TypeReference _typeReference_1 = new TypeReference("org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider"); _addTypeToType.addTypeToType(_typeReference_1, this.getOutlineTreeProviderClass(this.getGrammar())).contributeTo(this.getLanguage().getEclipsePluginGenModule()); }
Example 6
Source File: XbaseGeneratorFragment2.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
protected void contributeRuntimeGuiceBindings() { final GuiceModuleAccess.BindingFactory bindingFactory = new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(IQualifiedNameProvider.class), TypeReference.typeRef("org.eclipse.xtext.xbase.scoping.XbaseQualifiedNameProvider")); boolean _usesXImportSection = this._xbaseUsageDetector.usesXImportSection(this.getGrammar()); boolean _not = (!_usesXImportSection); if (_not) { StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { _builder.append("binder.bind("); _builder.append(Boolean.class); _builder.append(".TYPE)"); _builder.newLineIfNotEmpty(); _builder.append("\t"); _builder.append(".annotatedWith("); _builder.append(Names.class, "\t"); _builder.append(".named("); TypeReference _typeReference = new TypeReference("org.eclipse.xtext.xbase.imports", "RewritableImportSection.Factory"); _builder.append(_typeReference, "\t"); _builder.append(".REWRITABLEIMPORTSECTION_ENABLEMENT))"); _builder.newLineIfNotEmpty(); _builder.append("\t"); _builder.append(".toInstance("); _builder.append(Boolean.class, "\t"); _builder.append(".FALSE);"); _builder.newLineIfNotEmpty(); } }; bindingFactory.addConfiguredBinding("RewritableImportSectionEnablement", _client); } if (this.useInferredJvmModel) { bindingFactory.addTypeToType(TypeReference.typeRef(ILocationInFileProvider.class), TypeReference.typeRef("org.eclipse.xtext.xbase.jvmmodel.JvmLocationInFileProvider")).addTypeToType(TypeReference.typeRef(IGlobalScopeProvider.class), TypeReference.typeRef("org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider")).addTypeToType(TypeReference.typeRef("org.eclipse.xtext.xbase.validation.FeatureNameValidator"), TypeReference.typeRef("org.eclipse.xtext.xbase.validation.LogicalContainerAwareFeatureNameValidator")).addTypeToType(TypeReference.typeRef("org.eclipse.xtext.xbase.typesystem.internal.DefaultBatchTypeResolver"), TypeReference.typeRef("org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareBatchTypeResolver")).addTypeToType(TypeReference.typeRef("org.eclipse.xtext.xbase.typesystem.internal.DefaultReentrantTypeResolver"), TypeReference.typeRef("org.eclipse.xtext.xbase.typesystem.internal.LogicalContainerAwareReentrantTypeResolver")).addTypeToType(TypeReference.typeRef(IResourceValidator.class), TypeReference.typeRef("org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator")); if (this.generateXtendInferrer) { bindingFactory.addTypeToType(TypeReference.typeRef("org.eclipse.xtext.xbase.jvmmodel.IJvmModelInferrer"), this.getJvmModelInferrer()); } } else { bindingFactory.addTypeToType(TypeReference.typeRef(ILocationInFileProvider.class), TypeReference.typeRef("org.eclipse.xtext.xbase.resource.XbaseLocationInFileProvider")); } bindingFactory.contributeTo(this.getLanguage().getRuntimeGenModule()); boolean _inheritsXbaseWithAnnotations = this._xbaseUsageDetector.inheritsXbaseWithAnnotations(this.getLanguage().getGrammar()); if (_inheritsXbaseWithAnnotations) { GuiceModuleAccess _runtimeGenModule = this.getLanguage().getRuntimeGenModule(); _runtimeGenModule.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.xbase.annotations.DefaultXbaseWithAnnotationsRuntimeModule")); } else { GuiceModuleAccess _runtimeGenModule_1 = this.getLanguage().getRuntimeGenModule(); _runtimeGenModule_1.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.xbase.DefaultXbaseRuntimeModule")); } }
Example 7
Source File: XtextAntlrGeneratorFragment2.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
protected void addIdeBindingsAndImports() { @Extension final ContentAssistGrammarNaming naming = this.contentAssistNaming; ManifestAccess _manifest = this.getProjectConfig().getGenericIde().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { ManifestAccess _manifest_1 = this.getProjectConfig().getGenericIde().getManifest(); final Procedure1<ManifestAccess> _function = (ManifestAccess it) -> { Set<String> _exportedPackages = it.getExportedPackages(); String _packageName = naming.getLexerClass(this.getGrammar()).getPackageName(); String _packageName_1 = naming.getParserClass(this.getGrammar()).getPackageName(); String _packageName_2 = naming.getInternalParserClass(this.getGrammar()).getPackageName(); Iterables.<String>addAll(_exportedPackages, Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList(_packageName, _packageName_1, _packageName_2))); Set<String> _requiredBundles = it.getRequiredBundles(); _requiredBundles.add("org.antlr.runtime;bundle-version=\"[3.2.0,3.2.1)\""); }; ObjectExtensions.<ManifestAccess>operator_doubleArrow(_manifest_1, _function); } GuiceModuleAccess.BindingFactory _bindingFactory = new GuiceModuleAccess.BindingFactory(); StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { _builder.append("binder.bind("); TypeReference _lexerSuperClass = naming.getLexerSuperClass(XtextAntlrGeneratorFragment2.this.getGrammar()); _builder.append(_lexerSuperClass); _builder.append(".class)"); _builder.newLineIfNotEmpty(); _builder.append("\t"); _builder.append(".annotatedWith("); _builder.append(Names.class, "\t"); _builder.append(".named("); TypeReference _typeRef = TypeReference.typeRef("org.eclipse.xtext.ide.LexerIdeBindings"); _builder.append(_typeRef, "\t"); _builder.append(".CONTENT_ASSIST))"); _builder.newLineIfNotEmpty(); _builder.append("\t"); _builder.append(".to("); TypeReference _lexerClass = naming.getLexerClass(XtextAntlrGeneratorFragment2.this.getGrammar()); _builder.append(_lexerClass, "\t"); _builder.append(".class);"); _builder.newLineIfNotEmpty(); } }; final GuiceModuleAccess.BindingFactory ideBindings = _bindingFactory.addConfiguredBinding("ContentAssistLexer", _client).addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser"), naming.getParserClass(this.getGrammar())).addTypeToType( TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper"), TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper")); if (this.partialParsing) { ideBindings.addTypeToType( TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory"), TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.antlr.PartialContentAssistContextFactory")); } boolean _hasSyntheticTerminalRule = this.hasSyntheticTerminalRule(); if (_hasSyntheticTerminalRule) { ideBindings.addTypeToType( TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.CompletionPrefixProvider"), TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.IndentationAwareCompletionPrefixProvider")); } ideBindings.contributeTo(this.getLanguage().getIdeGenModule()); }
Example 8
Source File: ContentAssistFragment2.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public void generate() { ManifestAccess _manifest = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { Set<String> _requiredBundles = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles(); _requiredBundles.add("org.eclipse.xtext.ui"); } GuiceModuleAccess.BindingFactory _bindingFactory = new GuiceModuleAccess.BindingFactory(); TypeReference _typeReference = new TypeReference("org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider"); _bindingFactory.addTypeToType(_typeReference, this.getProposalProviderClass(this.getGrammar())).contributeTo(this.getLanguage().getEclipsePluginGenModule()); IXtextGeneratorFileSystemAccess _srcGen = this.getProjectConfig().getEclipsePlugin().getSrcGen(); boolean _tripleNotEquals_1 = (_srcGen != null); if (_tripleNotEquals_1) { this.generateGenJavaProposalProvider(); } if ((this.isGenerateStub() && (this.getProjectConfig().getEclipsePlugin().getSrc() != null))) { boolean _isGenerateXtendStub = this.isGenerateXtendStub(); if (_isGenerateXtendStub) { this.generateXtendProposalProviderStub(); ManifestAccess _manifest_1 = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_2 = (_manifest_1 != null); if (_tripleNotEquals_2) { Set<String> _requiredBundles_1 = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles(); String _xbaseLibVersionLowerBound = this.getProjectConfig().getRuntime().getXbaseLibVersionLowerBound(); String _plus = ("org.eclipse.xtext.xbase.lib;bundle-version=\"" + _xbaseLibVersionLowerBound); String _plus_1 = (_plus + "\""); _requiredBundles_1.add(_plus_1); Set<String> _requiredBundles_2 = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles(); _requiredBundles_2.add("org.eclipse.xtend.lib;resolution:=optional"); } } else { this.generateJavaProposalProviderStub(); } } ManifestAccess _manifest_2 = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_3 = (_manifest_2 != null); if (_tripleNotEquals_3) { Set<String> _exportedPackages = this.getProjectConfig().getEclipsePlugin().getManifest().getExportedPackages(); String _packageName = this.getProposalProviderClass(this.getGrammar()).getPackageName(); _exportedPackages.add(_packageName); } }
Example 9
Source File: SimpleProjectWizardFragment2.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public void generate() { if ((!this.generate)) { return; } IBundleProjectConfig _eclipsePlugin = this.getProjectConfig().getEclipsePlugin(); ManifestAccess _manifest = null; if (_eclipsePlugin!=null) { _manifest=_eclipsePlugin.getManifest(); } boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { Set<String> _requiredBundles = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles(); Iterables.<String>addAll(_requiredBundles, Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("org.eclipse.ui", "org.eclipse.core.runtime", "org.eclipse.core.resources", "org.eclipse.ui.ide"))); } GuiceModuleAccess.BindingFactory _bindingFactory = new GuiceModuleAccess.BindingFactory(); TypeReference _typeReference = new TypeReference("org.eclipse.xtext.ui.wizard.IProjectCreator"); String _projectCreatorClassName = this.getProjectCreatorClassName(); TypeReference _typeReference_1 = new TypeReference(_projectCreatorClassName); _bindingFactory.addTypeToType(_typeReference, _typeReference_1).contributeTo(this.getLanguage().getEclipsePluginGenModule()); IBundleProjectConfig _eclipsePlugin_1 = this.getProjectConfig().getEclipsePlugin(); PluginXmlAccess _pluginXml = null; if (_eclipsePlugin_1!=null) { _pluginXml=_eclipsePlugin_1.getPluginXml(); } boolean _tripleNotEquals_1 = (_pluginXml != null); if (_tripleNotEquals_1) { List<CharSequence> _entries = this.getProjectConfig().getEclipsePlugin().getPluginXml().getEntries(); StringConcatenation _builder = new StringConcatenation(); _builder.append("<extension"); _builder.newLine(); _builder.append("\t"); _builder.append("point=\"org.eclipse.ui.newWizards\">"); _builder.newLine(); _builder.append("\t"); _builder.append("<wizard"); _builder.newLine(); _builder.append("\t\t"); _builder.append("category=\"org.eclipse.xtext.projectwiz\""); _builder.newLine(); _builder.append("\t\t"); _builder.append("class=\""); TypeReference _eclipsePluginExecutableExtensionFactory = this._xtextGeneratorNaming.getEclipsePluginExecutableExtensionFactory(this.getGrammar()); _builder.append(_eclipsePluginExecutableExtensionFactory, "\t\t"); _builder.append(":"); String _projectWizardClassName = this.getProjectWizardClassName(); _builder.append(_projectWizardClassName, "\t\t"); _builder.append("\""); _builder.newLineIfNotEmpty(); _builder.append("\t\t"); _builder.append("id=\""); String _projectWizardClassName_1 = this.getProjectWizardClassName(); _builder.append(_projectWizardClassName_1, "\t\t"); _builder.append("\""); _builder.newLineIfNotEmpty(); _builder.append("\t\t"); _builder.append("name=\""); String _simpleName = GrammarUtil.getSimpleName(this.getGrammar()); _builder.append(_simpleName, "\t\t"); _builder.append(" Project\""); _builder.newLineIfNotEmpty(); _builder.append("\t\t\t"); _builder.append("project=\"true\">"); _builder.newLine(); _builder.append("\t"); _builder.append("</wizard>"); _builder.newLine(); _builder.append("</extension>"); _builder.newLine(); _entries.add(_builder.toString()); } this.generateProjectInfo(); this.generateWizardNewProjectCreationPage(); this.generateNewProjectWizardInitialContents(); this.generateProjectCreator(); this.generateNewProjectWizard(); }
Example 10
Source File: QuickfixProviderFragment2.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public void generate() { GuiceModuleAccess.BindingFactory _bindingFactory = new GuiceModuleAccess.BindingFactory(); TypeReference _typeReference = new TypeReference("org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider"); _bindingFactory.addTypeToType(_typeReference, this.getQuickfixProviderClass(this.getGrammar())).contributeTo(this.getLanguage().getEclipsePluginGenModule()); boolean _isGenerateStub = this.isGenerateStub(); if (_isGenerateStub) { IBundleProjectConfig _eclipsePlugin = this.getProjectConfig().getEclipsePlugin(); IXtextGeneratorFileSystemAccess _src = null; if (_eclipsePlugin!=null) { _src=_eclipsePlugin.getSrc(); } boolean _tripleNotEquals = (_src != null); if (_tripleNotEquals) { boolean _isGenerateXtendStub = this.isGenerateXtendStub(); if (_isGenerateXtendStub) { this.generateXtendQuickfixProvider(); } else { this.generateJavaQuickfixProvider(); } } ManifestAccess _manifest = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_1 = (_manifest != null); if (_tripleNotEquals_1) { Set<String> _exportedPackages = this.getProjectConfig().getEclipsePlugin().getManifest().getExportedPackages(); String _packageName = this.getQuickfixProviderClass(this.getGrammar()).getPackageName(); _exportedPackages.add(_packageName); } PluginXmlAccess _pluginXml = this.getProjectConfig().getEclipsePlugin().getPluginXml(); boolean _tripleNotEquals_2 = (_pluginXml != null); if (_tripleNotEquals_2) { this.addRegistrationToPluginXml(); } } else { IBundleProjectConfig _eclipsePlugin_1 = this.getProjectConfig().getEclipsePlugin(); IXtextGeneratorFileSystemAccess _srcGen = null; if (_eclipsePlugin_1!=null) { _srcGen=_eclipsePlugin_1.getSrcGen(); } boolean _tripleNotEquals_3 = (_srcGen != null); if (_tripleNotEquals_3) { this.generateGenQuickfixProvider(); } ManifestAccess _manifest_1 = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_4 = (_manifest_1 != null); if (_tripleNotEquals_4) { Set<String> _exportedPackages_1 = this.getProjectConfig().getEclipsePlugin().getManifest().getExportedPackages(); String _packageName_1 = this.getQuickfixProviderClass(this.getGrammar()).getPackageName(); _exportedPackages_1.add(_packageName_1); } } }
Example 11
Source File: ImplicitFragment.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public void generate() { ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { this.getProjectConfig().getRuntime().getManifest().getRequiredBundles().addAll( Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("org.eclipse.xtext", "org.eclipse.xtext.util"))); boolean _isGenerateXtendStub = this.isGenerateXtendStub(); if (_isGenerateXtendStub) { Set<String> _requiredBundles = this.getProjectConfig().getRuntime().getManifest().getRequiredBundles(); String _xtendLibVersionLowerBound = this.getProjectConfig().getRuntime().getXtendLibVersionLowerBound(); String _plus = ("org.eclipse.xtend.lib;bundle-version=\"" + _xtendLibVersionLowerBound); String _plus_1 = (_plus + "\""); _requiredBundles.add(_plus_1); } this.getProjectConfig().getRuntime().getManifest().getImportedPackages().add("org.apache.log4j"); } ManifestAccess _manifest_1 = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_1 = (_manifest_1 != null); if (_tripleNotEquals_1) { this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles().addAll( Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("org.eclipse.xtext.ui", "org.eclipse.xtext.ui.shared", "org.eclipse.ui.editors", "org.eclipse.ui"))); boolean _isGenerateXtendStub_1 = this.isGenerateXtendStub(); if (_isGenerateXtendStub_1) { Set<String> _requiredBundles_1 = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles(); String _xtendLibVersionLowerBound_1 = this.getProjectConfig().getRuntime().getXtendLibVersionLowerBound(); String _plus_2 = ("org.eclipse.xtend.lib;bundle-version=\"" + _xtendLibVersionLowerBound_1); String _plus_3 = (_plus_2 + "\""); _requiredBundles_1.add(_plus_3); } this.getProjectConfig().getEclipsePlugin().getManifest().getImportedPackages().add("org.apache.log4j"); } PluginXmlAccess _pluginXml = this.getProjectConfig().getEclipsePlugin().getPluginXml(); boolean _tripleNotEquals_2 = (_pluginXml != null); if (_tripleNotEquals_2) { List<CharSequence> _entries = this.getProjectConfig().getEclipsePlugin().getPluginXml().getEntries(); CharSequence _implicitPluginXmlEnties = this.getImplicitPluginXmlEnties(this.getGrammar()); _entries.add(_implicitPluginXmlEnties); } StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { TypeReference _typeRef = TypeReference.typeRef("org.eclipse.xtext.ui.shared.Access"); _builder.append(_typeRef); _builder.append(".getJavaProjectsState()"); } }; final StringConcatenationClient expression = _client; final GuiceModuleAccess.BindingFactory bindingFactory = new GuiceModuleAccess.BindingFactory().addTypeToProviderInstance(TypeReference.typeRef(IAllContainersState.class), expression); boolean _inheritsXbase = this._xbaseUsageDetector.inheritsXbase(this.getGrammar()); if (_inheritsXbase) { bindingFactory.addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"), TypeReference.typeRef("org.eclipse.xtext.xbase.ui.editor.XbaseDocumentProvider")).addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"), TypeReference.typeRef("org.eclipse.xtext.xbase.ui.generator.trace.XbaseOpenGeneratedFileHandler")); } bindingFactory.contributeTo(this.getLanguage().getEclipsePluginGenModule()); }