org.eclipse.xtext.scoping.IGlobalScopeProvider Java Examples
The following examples show how to use
org.eclipse.xtext.scoping.IGlobalScopeProvider.
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: LazyLinkingResourceTest.java From xtext-core with Eclipse Public License 2.0 | 6 votes |
protected ISetup lazyLinkingTestLangaugeSetup() { return new LazyLinkingTestLanguageStandaloneSetup() { @Override public Injector createInjector() { return Guice.createInjector(new org.eclipse.xtext.linking.lazy.LazyLinkingTestLanguageRuntimeModule() { @Override public void configureIResourceDescriptions(Binder binder) { binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).to( ProxyfyingResourceDecriptions.class); } @Override public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class; } }); } }; }
Example #2
Source File: AbstractScopingFragment.java From xtext-extras with Eclipse Public License 2.0 | 6 votes |
@Override public Set<Binding> getGuiceBindingsRt(Grammar grammar) { BindFactory factory = new BindFactory(); if (!XbaseGeneratorFragment.doesUseXbase(grammar)) { if(isGenerateStub) { factory.addTypeToType(IScopeProvider.class.getName(), getScopeProviderName(grammar, getNaming())); } else { factory.addTypeToType(IScopeProvider.class.getName(), getLocalScopeProvider().getName()); } factory.addConfiguredBinding( IScopeProvider.class.getName() + "Delegate", "binder.bind(" + IScopeProvider.class.getName() + ".class" + ").annotatedWith(com.google.inject.name.Names.named(" + AbstractDeclarativeScopeProvider.class.getName() + ".NAMED_DELEGATE" + ")).to(" + getLocalScopeProvider().getName() + ".class)"); factory.addTypeToType(IGlobalScopeProvider.class.getName(), getGlobalScopeProvider().getName()); } factory.addConfiguredBinding(IgnoreCaseLinking.class.getSimpleName(), "binder.bindConstant().annotatedWith(" + IgnoreCaseLinking.class.getName() + ".class).to(" + isIgnoreCase() + ")"); return factory.getBindings(); }
Example #3
Source File: ImportedNamespaceAwareLocalScopeProvider.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
public ImportedNamespaceAwareLocalScopeProvider(IGlobalScopeProvider globalScopeProvider, IQualifiedNameProvider qualifiedNameProvider, IQualifiedNameConverter qualifiedNameConverter, ICaseInsensitivityHelper caseInsensitivityHelper) { super(globalScopeProvider, caseInsensitivityHelper); this.qualifiedNameProvider = qualifiedNameProvider; this.qualifiedNameConverter = qualifiedNameConverter; }
Example #4
Source File: AbstractIndentationAwareUiTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #5
Source File: AbstractBeeLangTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #6
Source File: AbstractLangATestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #7
Source File: AbstractIgnoreCaseNamespacesTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #8
Source File: IndexTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class; }
Example #9
Source File: CheckRuntimeModule.java From dsl-devkit with Eclipse Public License 1.0 | 4 votes |
/** Global scope provider which finds catalogs in the plugin registry. {@inheritDoc} */ @Override public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return ExtensionPointAwareScopeProvider.class; }
Example #10
Source File: AbstractHelloWorldRuntimeModule.java From dsl-devkit with Eclipse Public License 1.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #11
Source File: CheckCfgRuntimeModule.java From dsl-devkit with Eclipse Public License 1.0 | 4 votes |
/** A global scope provider finding check models in the plugin registry. {@inheritDoc} */ @Override public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return ExtensionPointAwareScopeProvider.class; }
Example #12
Source File: AbstractGamlRuntimeModule.java From gama with GNU General Public License v3.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #13
Source File: AbstractSARLRuntimeModule.java From sarl with Apache License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return TypesAwareDefaultGlobalScopeProvider.class; }
Example #14
Source File: AbstractAbstractIgnoreCaseLinkingTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #15
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 #16
Source File: AbstractTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #17
Source File: AbstractRenameTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #18
Source File: AbstractSimpleBeeLangTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #19
Source File: AbstractPartialSerializationTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #20
Source File: AbstractPartialContentAssistTestLanguageRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #21
Source File: XtextRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
@Override public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #22
Source File: AbstractGlobalScopeDelegatingScopeProvider.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
protected AbstractGlobalScopeDelegatingScopeProvider(IGlobalScopeProvider globalScopeProvider, ICaseInsensitivityHelper caseInsensitivityHelper) { this.globalScopeProvider = globalScopeProvider; this.caseInsensitivityHelper = caseInsensitivityHelper; }
Example #23
Source File: DefaultRuntimeModule.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return ImportUriGlobalScopeProvider.class; }
Example #24
Source File: AbstractXtendRuntimeModule.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return TypesAwareDefaultGlobalScopeProvider.class; }
Example #25
Source File: BuilderTestLanguageRuntimeModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
@Override public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #26
Source File: AbstractBuilderTestLanguageRuntimeModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #27
Source File: AbstractArithmeticsRuntimeModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #28
Source File: AbstractRuleEngineRuntimeModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return TypesAwareDefaultGlobalScopeProvider.class; }
Example #29
Source File: AbstractStatemachineRuntimeModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return DefaultGlobalScopeProvider.class; }
Example #30
Source File: AbstractDomainmodelRuntimeModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { return TypesAwareDefaultGlobalScopeProvider.class; }