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