diff options
Diffstat (limited to 'language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java')
-rw-r--r-- | language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java b/language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java new file mode 100644 index 00000000..eb9ddd77 --- /dev/null +++ b/language/src/main/java/org/eclipse/viatra/solver/language/ProblemRuntimeModule.java | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.25.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language; | ||
5 | |||
6 | import org.eclipse.viatra.solver.language.conversion.ProblemValueConverterService; | ||
7 | import org.eclipse.viatra.solver.language.naming.ProblemQualifiedNameConverter; | ||
8 | import org.eclipse.viatra.solver.language.resource.ProblemDerivedStateComputer; | ||
9 | import org.eclipse.viatra.solver.language.resource.ProblemLocationInFileProvider; | ||
10 | import org.eclipse.viatra.solver.language.resource.ProblemResourceDescriptionStrategy; | ||
11 | import org.eclipse.viatra.solver.language.scoping.ProblemGlobalScopeProvider; | ||
12 | import org.eclipse.viatra.solver.language.scoping.ProblemLocalScopeProvider; | ||
13 | import org.eclipse.xtext.conversion.IValueConverterService; | ||
14 | import org.eclipse.xtext.naming.IQualifiedNameConverter; | ||
15 | import org.eclipse.xtext.resource.DerivedStateAwareResource; | ||
16 | import org.eclipse.xtext.resource.DerivedStateAwareResourceDescriptionManager; | ||
17 | import org.eclipse.xtext.resource.IDefaultResourceDescriptionStrategy; | ||
18 | import org.eclipse.xtext.resource.IDerivedStateComputer; | ||
19 | import org.eclipse.xtext.resource.ILocationInFileProvider; | ||
20 | import org.eclipse.xtext.resource.IResourceDescription; | ||
21 | import org.eclipse.xtext.resource.XtextResource; | ||
22 | import org.eclipse.xtext.scoping.IGlobalScopeProvider; | ||
23 | import org.eclipse.xtext.scoping.IScopeProvider; | ||
24 | import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; | ||
25 | import org.eclipse.xtext.validation.IResourceValidator; | ||
26 | import org.eclipse.xtext.xbase.annotations.validation.DerivedStateAwareResourceValidator; | ||
27 | |||
28 | import com.google.inject.Binder; | ||
29 | import com.google.inject.name.Names; | ||
30 | |||
31 | /** | ||
32 | * Use this class to register components to be used at runtime / without the | ||
33 | * Equinox extension registry. | ||
34 | */ | ||
35 | public class ProblemRuntimeModule extends AbstractProblemRuntimeModule { | ||
36 | public Class<? extends IQualifiedNameConverter> bindIQualifiedNameConverter() { | ||
37 | return ProblemQualifiedNameConverter.class; | ||
38 | } | ||
39 | |||
40 | public Class<? extends IDefaultResourceDescriptionStrategy> bindIDefaultResourceDescriptionStrategy() { | ||
41 | return ProblemResourceDescriptionStrategy.class; | ||
42 | } | ||
43 | |||
44 | @Override | ||
45 | public Class<? extends IValueConverterService> bindIValueConverterService() { | ||
46 | return ProblemValueConverterService.class; | ||
47 | } | ||
48 | |||
49 | @Override | ||
50 | public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { | ||
51 | return ProblemGlobalScopeProvider.class; | ||
52 | } | ||
53 | |||
54 | @Override | ||
55 | public void configureIScopeProviderDelegate(Binder binder) { | ||
56 | binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)) | ||
57 | .to(ProblemLocalScopeProvider.class); | ||
58 | } | ||
59 | |||
60 | @Override | ||
61 | public Class<? extends XtextResource> bindXtextResource() { | ||
62 | return DerivedStateAwareResource.class; | ||
63 | } | ||
64 | |||
65 | public Class<? extends IResourceDescription.Manager> bindIResourceDescription$Manager() { | ||
66 | return DerivedStateAwareResourceDescriptionManager.class; | ||
67 | } | ||
68 | |||
69 | public Class<? extends IResourceValidator> bindIResourceValidator() { | ||
70 | return DerivedStateAwareResourceValidator.class; | ||
71 | } | ||
72 | |||
73 | public Class<? extends IDerivedStateComputer> bindIDerivedStateComputer() { | ||
74 | return ProblemDerivedStateComputer.class; | ||
75 | } | ||
76 | |||
77 | public Class<? extends ILocationInFileProvider> bindILocationInFileProvider() { | ||
78 | return ProblemLocationInFileProvider.class; | ||
79 | } | ||
80 | } | ||