/* * SPDX-FileCopyrightText: 2021-2024 The Refinery Authors * * SPDX-License-Identifier: EPL-2.0 */ /* * generated by Xtext 2.25.0 */ package tools.refinery.language; import com.google.inject.Binder; import com.google.inject.name.Names; import org.eclipse.xtext.conversion.IValueConverterService; import org.eclipse.xtext.linking.ILinkingService; import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.IQualifiedNameProvider; import org.eclipse.xtext.parser.IAstFactory; import org.eclipse.xtext.parser.IParser; import org.eclipse.xtext.parsetree.reconstr.ITransientValueService; import org.eclipse.xtext.resource.*; import org.eclipse.xtext.scoping.IGlobalScopeProvider; import org.eclipse.xtext.scoping.IScopeProvider; import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer; import org.eclipse.xtext.serializer.tokens.ICrossReferenceSerializer; import org.eclipse.xtext.validation.IDiagnosticConverter; import org.eclipse.xtext.validation.IResourceValidator; import org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator; import tools.refinery.language.conversion.ProblemValueConverterService; import tools.refinery.language.linking.ProblemLinkingService; import tools.refinery.language.naming.ProblemDelegateQualifiedNameProvider; import tools.refinery.language.naming.ProblemQualifiedNameConverter; import tools.refinery.language.naming.ProblemQualifiedNameProvider; import tools.refinery.language.parser.ProblemEcoreElementFactory; import tools.refinery.language.parser.antlr.TokenSourceInjectingProblemParser; import tools.refinery.language.resource.ProblemLocationInFileProvider; import tools.refinery.language.resource.ProblemResource; import tools.refinery.language.resource.ProblemResourceDescriptionManager; import tools.refinery.language.resource.ProblemResourceDescriptionStrategy; import tools.refinery.language.resource.state.ProblemDerivedStateComputer; import tools.refinery.language.scoping.ProblemGlobalScopeProvider; import tools.refinery.language.scoping.ProblemLocalScopeProvider; import tools.refinery.language.serializer.PreferShortAssertionsProblemSemanticSequencer; import tools.refinery.language.serializer.ProblemCrossReferenceSerializer; import tools.refinery.language.serializer.ProblemTransientValueService; import tools.refinery.language.validation.ProblemDiagnosticConverter; /** * Use this class to register components to be used at runtime / without the * Equinox extension registry. */ // Unused methods in this class are called by reflection to configure the Xtext Injector. @SuppressWarnings("unused") public class ProblemRuntimeModule extends AbstractProblemRuntimeModule { @Override public Class bindIParser() { return TokenSourceInjectingProblemParser.class; } @Override public Class bindIAstFactory() { return ProblemEcoreElementFactory.class; } public Class bindIQualifiedNameConverter() { return ProblemQualifiedNameConverter.class; } public void configureIQualifiedNameProviderDelegate(Binder binder) { binder.bind(IQualifiedNameProvider.class) .annotatedWith(Names.named(ProblemQualifiedNameProvider.NAMED_DELEGATE)) .to(ProblemDelegateQualifiedNameProvider.class); } @Override public Class bindIQualifiedNameProvider() { return ProblemQualifiedNameProvider.class; } public Class bindIDefaultResourceDescriptionStrategy() { return ProblemResourceDescriptionStrategy.class; } @Override public Class bindIValueConverterService() { return ProblemValueConverterService.class; } @Override public Class bindILinkingService() { return ProblemLinkingService.class; } @Override public Class bindIGlobalScopeProvider() { return ProblemGlobalScopeProvider.class; } @Override public void configureIScopeProviderDelegate(Binder binder) { binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)) .to(ProblemLocalScopeProvider.class); } @Override public Class bindXtextResource() { return ProblemResource.class; } // Method name follows Xtext convention. @SuppressWarnings("squid:S100") public Class bindIResourceDescription$Manager() { return ProblemResourceDescriptionManager.class; } public Class bindIResourceValidator() { return DerivedStateAwareResourceValidator.class; } public Class bindIDerivedStateComputer() { return ProblemDerivedStateComputer.class; } @Override public Class bindILocationInFileProvider() { return ProblemLocationInFileProvider.class; } @Override public Class bindITransientValueService() { return ProblemTransientValueService.class; } @Override public Class bindISemanticSequencer() { return PreferShortAssertionsProblemSemanticSequencer.class; } public Class bindICrossReferenceSerializer() { return ProblemCrossReferenceSerializer.class; } public Class bindIDiagnosticConverter() { return ProblemDiagnosticConverter.class; } }