private void generateGuiceModuleRt(final LanguageConfig config1, final XpandExecutionContext ctx) { final IXtextGeneratorLanguage config2 = this.getLanguage(); final Set<Binding> bindings = this.fragment.getGuiceBindingsRt(config1.getGrammar()); if ((bindings != null)) { final Function1<Binding, GuiceModuleAccess.Binding> _function = (Binding it) -> { return this.translateBinding(it); }; config2.getRuntimeGenModule().addAll(IterableExtensions.<Binding, GuiceModuleAccess.Binding>map(bindings, _function)); } if ((this.fragment instanceof IGeneratorFragmentExtension4)) { final String superClass = ((IGeneratorFragmentExtension4)this.fragment).getDefaultRuntimeModuleClassName(config1.getGrammar()); if ((superClass != null)) { GuiceModuleAccess _runtimeGenModule = config2.getRuntimeGenModule(); TypeReference _typeReference = new TypeReference(superClass); _runtimeGenModule.setSuperClass(_typeReference); } } }
private void generateGuiceModuleUi(final LanguageConfig config1, final XpandExecutionContext ctx) { final IXtextGeneratorLanguage config2 = this.getLanguage(); final Set<Binding> bindings = this.fragment.getGuiceBindingsUi(config1.getGrammar()); if ((bindings != null)) { final Function1<Binding, GuiceModuleAccess.Binding> _function = (Binding it) -> { return this.translateBinding(it); }; config2.getEclipsePluginGenModule().addAll(IterableExtensions.<Binding, GuiceModuleAccess.Binding>map(bindings, _function)); } if ((this.fragment instanceof IGeneratorFragmentExtension4)) { final String superClass = ((IGeneratorFragmentExtension4)this.fragment).getDefaultUiModuleClassName(config1.getGrammar()); if ((superClass != null)) { GuiceModuleAccess _eclipsePluginGenModule = config2.getEclipsePluginGenModule(); TypeReference _typeReference = new TypeReference(superClass); _eclipsePluginGenModule.setSuperClass(_typeReference); } } }
@Override public void generate() { new GuiceModuleAccess.BindingFactory().addTypeToTypeEagerSingleton(this._validatorNaming.getValidatorClass(this.getGrammar()), this._validatorNaming.getValidatorClass(this.getGrammar())).contributeTo(this.getLanguage().getRuntimeGenModule()); boolean _isGenerateStub = this.isGenerateStub(); if (_isGenerateStub) { boolean _isGenerateXtendStub = this.isGenerateXtendStub(); if (_isGenerateXtendStub) { this.generateXtendValidatorStub(); } else { this.generateJavaValidatorStub(); } } this.generateGenValidator(); ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { Set<String> _exportedPackages = this.getProjectConfig().getRuntime().getManifest().getExportedPackages(); String _packageName = this._validatorNaming.getValidatorClass(this.getGrammar()).getPackageName(); _exportedPackages.add(_packageName); } PluginXmlAccess _pluginXml = this.getProjectConfig().getEclipsePlugin().getPluginXml(); boolean _tripleNotEquals_1 = (_pluginXml != null); if (_tripleNotEquals_1) { this.contributeEclipsePluginExtensions(); } }
private void registerGuiceBindingsUi() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(OutlineFilterAndSorter.class), typeRef(OutlineFlattenFilterAndSorter.class)) .addConfiguredBinding("ToggleOutlineViewContribution", new StringConcatenationClient() { @Override protected void appendTo(TargetStringConcatenation target) { target.append("binder.bind("); target.append(typeRef(IOutlineContribution.class)); target.append(".class).annotatedWith("); target.append(typeRef(Names.class)); target.append(".named(\"ToogleOutlineView\")).to("); target.append(typeRef(FlatOutlineViewContribution.class)); target.append(".class);"); } }).contributeTo(getLanguage().getEclipsePluginGenModule()); getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles() .add("de.cooperateproject.modeling.textual.common"); }
private void registerGuiceBindingsRt() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(IQualifiedNameProvider.class), typeRef(CommonQualifiedNameProvider.class)) .addTypeToType(typeRef(IAlternativeNameProvider.class), typeRef(CommonQualifiedNameProvider.class)) .addConfiguredBinding("IScopeProviderDelegate", new StringConcatenationClient() { @Override protected void appendTo(TargetStringConcatenation target) { target.append("binder.bind("); target.append(typeRef(IScopeProvider.class)); target.append(".class).annotatedWith("); target.append(typeRef(Names.class)); target.append(".named("); target.append(typeRef(AbstractDeclarativeScopeProvider.class)); target.append(".NAMED_DELEGATE)).to("); target.append(typeRef(CooperateImportedNamespaceAwareLocalScopeProvider.class)); target.append(".class);"); } }).contributeTo(getLanguage().getRuntimeGenModule()); }
@Override public void generate() { new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(IQualifiedNameProvider.class), TypeReference.typeRef(DefaultDeclarativeQualifiedNameProvider.class)).contributeTo(this.getLanguage().getRuntimeGenModule()); new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher"), TypeReference.typeRef("org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher")).addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator"), TypeReference.typeRef("org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator")).contributeTo(this.getLanguage().getEclipsePluginGenModule()); new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher"), TypeReference.typeRef("org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher")).contributeTo(this.getLanguage().getIdeGenModule()); }
@Override public void generate() { if ((this.onlyEnabledIfGrammarIsUsed.get() && (!this.xbaseUsageDetector.inheritsXtype(this.getLanguage().getGrammar())))) { return; } new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(IGlobalScopeProvider.class), TypeReference.typeRef("org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider")).contributeTo(this.getLanguage().getRuntimeGenModule()); GuiceModuleAccess _runtimeGenModule = this.getLanguage().getRuntimeGenModule(); _runtimeGenModule.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.common.types.DefaultCommonTypesRuntimeModule")); new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher"), TypeReference.typeRef("org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher")).contributeTo(this.getLanguage().getEclipsePluginGenModule()); GuiceModuleAccess _eclipsePluginGenModule = this.getLanguage().getEclipsePluginGenModule(); _eclipsePluginGenModule.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.common.types.ui.DefaultCommonTypesUiModule")); ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { CollectionExtensions.<String>addAll(this.getProjectConfig().getRuntime().getManifest().getRequiredBundles(), "org.eclipse.xtext.common.types", "org.objectweb.asm;bundle-version=\"[5.0.1,6.0.0)\";resolution:=optional"); } ManifestAccess _manifest_1 = this.getProjectConfig().getRuntimeTest().getManifest(); boolean _tripleNotEquals_1 = (_manifest_1 != null); if (_tripleNotEquals_1) { this.getProjectConfig().getRuntimeTest().getManifest().getRequiredBundles().add( "org.objectweb.asm;bundle-version=\"[5.0.1,6.0.0)\";resolution:=optional"); } ManifestAccess _manifest_2 = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_2 = (_manifest_2 != null); if (_tripleNotEquals_2) { this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles().add( "org.eclipse.xtext.common.types.ui"); } }
@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(); }
@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()); }
@Override public void generate() { new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(ISemanticSequencer.class), this.getSemanticSequencerClass(this.getGrammar())).addTypeToType(TypeReference.typeRef(ISyntacticSequencer.class), this.getSyntacticSequencerClass(this.getGrammar())).addTypeToType(TypeReference.typeRef(ISerializer.class), TypeReference.typeRef(Serializer.class)).contributeTo(this.getLanguage().getRuntimeGenModule()); ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { Set<String> _exportedPackages = this.getProjectConfig().getRuntime().getManifest().getExportedPackages(); String _serializerBasePackage = this.getSerializerBasePackage(this.getGrammar()); _exportedPackages.add(_serializerBasePackage); Set<String> _requiredBundles = this.getProjectConfig().getRuntime().getManifest().getRequiredBundles(); String _xbaseLibVersionLowerBound = this.getProjectConfig().getRuntime().getXbaseLibVersionLowerBound(); String _plus = ("org.eclipse.xtext.xbase.lib;bundle-version=\"" + _xbaseLibVersionLowerBound); String _plus_1 = (_plus + "\""); _requiredBundles.add(_plus_1); } this.generateAbstractSemanticSequencer(); this.generateAbstractSyntacticSequencer(); boolean _isGenerateStub = this.isGenerateStub(); if (_isGenerateStub) { this.generateSemanticSequencer(); this.generateSyntacticSequencer(); } if (this.generateDebugData) { this.generateGrammarConstraints(); Iterable<Pair<String, String>> _generateDebugGraphs = this.debugGraphGenerator.generateDebugGraphs(); for (final Pair<String, String> fileToContent : _generateDebugGraphs) { this.getProjectConfig().getRuntime().getSrcGen().generateFile(fileToContent.getKey(), fileToContent.getValue()); } } }
private CharSequence getBindMethodName(final GuiceModuleAccess.Binding it) { StringConcatenation _builder = new StringConcatenation(); { if (((!it.getValue().isProvider()) && it.getValue().getStatements().isEmpty())) { _builder.append("bind"); } else { boolean _isEmpty = it.getValue().getStatements().isEmpty(); if (_isEmpty) { _builder.append("provide"); } else { _builder.append("configure"); } } } String _elvis = null; String _name = it.getKey().getName(); String _replace = null; if (_name!=null) { _replace=_name.replace(".", "$"); } if (_replace != null) { _elvis = _replace; } else { String _simpleMethodName = this.getSimpleMethodName(it.getKey().getType()); _elvis = _simpleMethodName; } _builder.append(_elvis); { if (((it.getValue().getExpression() != null) && (!it.getValue().isProvider()))) { _builder.append("ToInstance"); } } return _builder; }
@Override public void generate() { boolean _isGenerateStub = this.isGenerateStub(); boolean _not = (!_isGenerateStub); if (_not) { return; } StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { _builder.append("binder.bind("); _builder.append(IPreferenceValuesProvider.class); _builder.append(".class).annotatedWith("); _builder.append(FormatterPreferences.class); _builder.append(".class).to("); _builder.append(FormatterPreferenceValuesProvider.class); _builder.append(".class);"); } }; final StringConcatenationClient statement = _client; new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(IFormatter2.class), this.getFormatter2Stub(this.getLanguage().getGrammar())).addConfiguredBinding(FormatterPreferences.class.getSimpleName(), statement).contributeTo(this.getLanguage().getRuntimeGenModule()); new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.editor.formatting.IContentFormatterFactory"), TypeReference.typeRef("org.eclipse.xtext.ui.editor.formatting2.ContentFormatterFactory")).contributeTo(this.getLanguage().getEclipsePluginGenModule()); ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { Set<String> _exportedPackages = this.getProjectConfig().getRuntime().getManifest().getExportedPackages(); String _runtimeBasePackage = this._xtextGeneratorNaming.getRuntimeBasePackage(this.getGrammar()); String _plus = (_runtimeBasePackage + ".formatting2"); _exportedPackages.add(_plus); } this.doGenerateStubFile(); }
private void registerGuiceBindingsRt() { // TODO Move stuff not related to resources to a new fragment new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(IAutomatedIssueResolutionProvider.class), typeRef(getAutomatedIssueResolutionProviderName())) .addTypeToType(typeRef(IIssueCodeRegistry.class), typeRef(IssueCodeRegistry.class)) .addTypeToType(typeRef(ICooperateAutomatedValidator.class), typeRef(CooperateAutomatedValidator.class)) .addTypeToType(typeRef(IAutomatedIssueResolutionFactoryRegistry.class), typeRef(AutomatedIssueResolutionFactoryRegistry.class)) .contributeTo(getLanguage().getRuntimeGenModule()); getProjectConfig().getRuntime().getManifest().getRequiredBundles() .add("de.cooperateproject.modeling.textual.xtext.runtime;visibility:=reexport"); }
private void registerGuiceBindingsRt() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(XtextResourceSet.class), typeRef(CooperateResourceSet.class)) .addTypeToType(typeRef(IGlobalScopeProvider.class), typeRef(CooperateGlobalScopeProvider.class)) .addTypeToType(typeRef(IGlobalScopeTypeQueryProvider.class), typeRef(CooperateGlobalScopeProvider.class)) .addTypeToType(typeRef(IUMLUriFinder.class), typeRef(ConventionalUMLUriFinder.class)) .addTypeToType(typeRef(IUMLPrimitiveTypeFilter.class), typeRef(DefaultUMLPrimitiveTypeFilter.class)) .contributeTo(getLanguage().getRuntimeGenModule()); getProjectConfig().getRuntime().getManifest().getRequiredBundles() .add("de.cooperateproject.modeling.textual.xtext.runtime;visibility:=reexport"); }
private void registerGuiceBindingsUi() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(XtextDocument.class), typeRef(CooperateXtextDocument.class)) .addTypeToType(typeRef(XtextDocumentProvider.class), typeRef(CooperateCDOXtextDocumentProvider.class)) .addTypeToType(typeRef(IResourceSetProvider.class), typeRef(XtextLiveScopeResourceSetProvider.class)) .contributeTo(getLanguage().getEclipsePluginGenModule()); getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles() .add("de.cooperateproject.modeling.textual.xtext.runtime.ui"); }
private void registerGuiceBindingsUi() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(DefaultTemplateProposalProvider.class), typeRef(CooperateTemplateProposalProvider.class)) .contributeTo(getLanguage().getEclipsePluginGenModule()); getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles() .add("de.cooperateproject.modeling.textual.xtext.runtime.ui"); }
private void registerGuiceBindingsRt() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(IValueConverterService.class), getValueConverterName()) .contributeTo(getLanguage().getRuntimeGenModule()); Set<String> requiredBundles = getProjectConfig().getRuntime().getManifest().getRequiredBundles(); requiredBundles.add("de.cooperateproject.modeling.textual.common;visibility:=reexport"); }
private void registerGuiceBindingsRt() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(IAtomicDerivedStateProcessorRegistry.class), typeRef(AtomicDerivedStateProcessorRegistry.class)) .addTypeToType(typeRef(IDerivedStateProcessor.class), typeRef(DerivedStateProcessor.class)) .addTypeToType(typeRef(ICDOResourceStateHandler.class), typeRef(DerivedStateProcessor.class)) .addTypeToType(typeRef(IDerivedStateComputer.class), typeRef(DefaultDerivedStateComputer.class)) .addTypeToType(typeRef(IDerivedStateComputerSorter.class), getDerivedStateElementComparatorName()) .addTypeToType(typeRef(ITransientStatusProvider.class), typeRef(DelegatingTransientStatusProvider.class)) .addTypeToType(typeRef(ITransientValueService.class), typeRef(BasicCooperateTransientValueService.class)) .addConfiguredBinding(ITransientValueService.class.getSimpleName(), new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation builder) { builder.append("binder.bind("); builder.append(org.eclipse.xtext.serializer.sequencer.ITransientValueService.class.getName()); builder.append(".class).to("); builder.append(BasicCooperateTransientValueService.class.getName()); builder.append(".class);"); } }) .addTypeToType(typeRef(XtextResource.class), typeRef(InitializingStateAwareResource.class)) .addTypeToType(typeRef(IResourceDescription.Manager.class), typeRef(DerivedStateAwareResourceDescriptionManager.class)) .contributeTo(getLanguage().getRuntimeGenModule()); Set<String> requiredBundles = getProjectConfig().getRuntime().getManifest().getRequiredBundles(); requiredBundles.add("de.cooperateproject.modeling.textual.xtext.runtime;visibility:=reexport"); requiredBundles.add("de.cooperateproject.modeling.textual.common;visibility:=reexport"); }
private GuiceModuleAccess.Binding translateBinding(final Binding it) { GuiceModuleAccess.Binding _xblockexpression = null; { GuiceModuleAccess.BindKey _xifexpression = null; if (((it.getValue().getStatements() == null) || ((List<String>)Conversions.doWrapArray(it.getValue().getStatements())).isEmpty())) { String _type = it.getKey().getType(); TypeReference _guessTypeRef = null; if (_type!=null) { _guessTypeRef=TypeReference.guessTypeRef(_type); } boolean _isSingleton = it.getKey().isSingleton(); boolean _isEagerSingleton = it.getKey().isEagerSingleton(); _xifexpression = new GuiceModuleAccess.BindKey(null, _guessTypeRef, _isSingleton, _isEagerSingleton); } else { String _className = this.getClassName(it.getKey().getType()); boolean _isSingleton_1 = it.getKey().isSingleton(); boolean _isEagerSingleton_1 = it.getKey().isEagerSingleton(); _xifexpression = new GuiceModuleAccess.BindKey(_className, null, _isSingleton_1, _isEagerSingleton_1); } final GuiceModuleAccess.BindKey newKey = _xifexpression; String _expression = it.getValue().getExpression(); String _typeName = it.getValue().getTypeName(); TypeReference _guessTypeRef_1 = null; if (_typeName!=null) { _guessTypeRef_1=TypeReference.guessTypeRef(_typeName); } boolean _isProvider = it.getValue().isProvider(); final Function1<String, Object> _function = (String s) -> { String _xifexpression_1 = null; boolean _endsWith = s.endsWith(";"); if (_endsWith) { _xifexpression_1 = s; } else { _xifexpression_1 = (s + ";"); } return _xifexpression_1; }; List<Object> _map = ListExtensions.<String, Object>map(((List<String>)Conversions.doWrapArray(it.getValue().getStatements())), _function); final GuiceModuleAccess.BindValue newValue = new GuiceModuleAccess.BindValue(_expression, _guessTypeRef_1, _isProvider, _map); boolean _isFinal = it.isFinal(); String _contributedBy = it.getContributedBy(); _xblockexpression = new GuiceModuleAccess.Binding(newKey, newValue, _isFinal, _contributedBy); } return _xblockexpression; }
@Override public void generate() { boolean _isGenerateStub = this.isGenerateStub(); if (_isGenerateStub) { new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(IGenerator2.class), this.getGeneratorStub(this.getLanguage().getGrammar())).contributeTo(this.getLanguage().getRuntimeGenModule()); ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals = (_manifest != null); if (_tripleNotEquals) { Set<String> _requiredBundles = this.getProjectConfig().getRuntime().getManifest().getRequiredBundles(); String _xbaseLibVersionLowerBound = this.getProjectConfig().getRuntime().getXbaseLibVersionLowerBound(); String _plus = ("org.eclipse.xtext.xbase.lib;bundle-version=\"" + _xbaseLibVersionLowerBound); String _plus_1 = (_plus + "\""); _requiredBundles.add(_plus_1); } boolean _isGenerateXtendStub = this.isGenerateXtendStub(); if (_isGenerateXtendStub) { this.doGenerateXtendStubFile(); } else { this.doGenerateJavaStubFile(); } } if ((this.isGenerateStub() || this.isGenerateJavaMain())) { ManifestAccess _manifest_1 = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals_1 = (_manifest_1 != null); if (_tripleNotEquals_1) { Set<String> _exportedPackages = this.getProjectConfig().getRuntime().getManifest().getExportedPackages(); String _packageName = this.getGeneratorStub(this.getLanguage().getGrammar()).getPackageName(); _exportedPackages.add(_packageName); } } boolean _isGenerateJavaMain = this.isGenerateJavaMain(); if (_isGenerateJavaMain) { this.doGenerateJavaMain(); } boolean _isGenerateXtendMain = this.isGenerateXtendMain(); if (_isGenerateXtendMain) { this.doGenerateXtendMain(); } boolean _isGenerateMwe = this.isGenerateMwe(); if (_isGenerateMwe) { this.doGenerateMweFile(); } this.contributeEclipsePluginGuiceBindings(); ManifestAccess _manifest_2 = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_2 = (_manifest_2 != null); if (_tripleNotEquals_2) { Set<String> _requiredBundles_1 = this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles(); _requiredBundles_1.add("org.eclipse.xtext.builder"); } PluginXmlAccess _pluginXml = this.getProjectConfig().getEclipsePlugin().getPluginXml(); boolean _tripleNotEquals_3 = (_pluginXml != null); if (_tripleNotEquals_3) { this.contributeEclipsePluginExtensions(); } }
@Override public void generate() { new GuiceModuleAccess.BindingFactory().addfinalTypeToType(TypeReference.typeRef(IQualifiedNameProvider.class), TypeReference.typeRef(SimpleNameProvider.class)).contributeTo(this.getLanguage().getRuntimeGenModule()); new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef("org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator"), TypeReference.typeRef("org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator")).contributeTo(this.getLanguage().getEclipsePluginGenModule()); }
@Override public void generate() { boolean _inheritsXbase = this._xbaseUsageDetector.inheritsXbase(this.getGrammar()); boolean _not = (!_inheritsXbase); if (_not) { return; } boolean _equals = this._xtextGeneratorNaming.getEclipsePluginEditor(this.getGrammar()).equals(this._xtextGeneratorNaming.getEclipsePluginXbaseEditor(this.getGrammar())); boolean _not_1 = (!_equals); if (_not_1) { this.contributeEditorStub(); } this.contributeRuntimeGuiceBindings(); this.contributeEclipsePluginGuiceBindings(); PluginXmlAccess _pluginXml = this.getProjectConfig().getEclipsePlugin().getPluginXml(); boolean _tripleNotEquals = (_pluginXml != null); if (_tripleNotEquals) { this.contributeEclipsePluginExtensions(); } if (this.generateXtendInferrer) { this.doGenerateXtendInferrer(); } ManifestAccess _manifest = this.getProjectConfig().getRuntime().getManifest(); boolean _tripleNotEquals_1 = (_manifest != null); if (_tripleNotEquals_1) { String _xbaseLibVersionLowerBound = this.getProjectConfig().getRuntime().getXbaseLibVersionLowerBound(); String _plus = ("org.eclipse.xtext.xbase.lib;bundle-version=\"" + _xbaseLibVersionLowerBound); String _plus_1 = (_plus + "\""); this.getProjectConfig().getRuntime().getManifest().getRequiredBundles().addAll( Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("org.eclipse.xtext.xbase", _plus_1))); if (((this.generateXtendInferrer || this.useInferredJvmModel) && (!this.skipExportedPackage))) { Set<String> _exportedPackages = this.getProjectConfig().getRuntime().getManifest().getExportedPackages(); String _packageName = this.getJvmModelInferrer().getPackageName(); _exportedPackages.add(_packageName); } } ManifestAccess _manifest_1 = this.getProjectConfig().getEclipsePlugin().getManifest(); boolean _tripleNotEquals_2 = (_manifest_1 != null); if (_tripleNotEquals_2) { this.getProjectConfig().getEclipsePlugin().getManifest().getRequiredBundles().addAll( Collections.<String>unmodifiableList(CollectionLiterals.<String>newArrayList("org.eclipse.xtext.xbase.ui", "org.eclipse.jdt.debug.ui"))); } GuiceModuleAccess _ideGenModule = this.getLanguage().getIdeGenModule(); _ideGenModule.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.xbase.ide.DefaultXbaseIdeModule")); GuiceModuleAccess _webGenModule = this.getLanguage().getWebGenModule(); _webGenModule.setSuperClass(TypeReference.typeRef("org.eclipse.xtext.xbase.web.DefaultXbaseWebModule")); }
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")); } }
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"); }; 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()); }
@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); } }
@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(); }
@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); } } }
@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()); }
@Override public void generate() { new GuiceModuleAccess.BindingFactory().addTypeToType(TypeReference.typeRef(IValueConverterService.class), TypeReference.typeRef(Ecore2XtextTerminalConverters.class)).contributeTo(this.getLanguage().getRuntimeGenModule()); }
@Pure public GuiceModuleAccess getRuntimeGenModule() { return this.runtimeGenModule; }
@Pure public GuiceModuleAccess getIdeGenModule() { return this.ideGenModule; }
@Pure public GuiceModuleAccess getEclipsePluginGenModule() { return this.eclipsePluginGenModule; }
@Pure public GuiceModuleAccess getIdeaGenModule() { return this.ideaGenModule; }
@Pure public GuiceModuleAccess getWebGenModule() { return this.webGenModule; }
private void registerGuiceBindingsEclipse() { new GuiceModuleAccess.BindingFactory() .addTypeToType(typeRef(XtextEditor.class), typeRef(CooperateCDOXtextEditor.class)) .contributeTo(getLanguage().getEclipsePluginGenModule()); }
public abstract GuiceModuleAccess getRuntimeGenModule();
public abstract GuiceModuleAccess getIdeGenModule();
public abstract GuiceModuleAccess getEclipsePluginGenModule();
public abstract GuiceModuleAccess getIdeaGenModule();
public abstract GuiceModuleAccess getWebGenModule();