diff options
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java | 201 |
1 files changed, 201 insertions, 0 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java new file mode 100644 index 00000000..642b465b --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/xtext-gen/org/eclipse/viatra/solver/language/AbstractProblemRuntimeModule.java | |||
@@ -0,0 +1,201 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language; | ||
5 | |||
6 | import com.google.inject.Binder; | ||
7 | import com.google.inject.Provider; | ||
8 | import com.google.inject.name.Names; | ||
9 | import java.util.Properties; | ||
10 | import org.eclipse.viatra.solver.language.generator.ProblemGenerator; | ||
11 | import org.eclipse.viatra.solver.language.parser.antlr.ProblemAntlrTokenFileProvider; | ||
12 | import org.eclipse.viatra.solver.language.parser.antlr.ProblemParser; | ||
13 | import org.eclipse.viatra.solver.language.parser.antlr.internal.InternalProblemLexer; | ||
14 | import org.eclipse.viatra.solver.language.scoping.ProblemScopeProvider; | ||
15 | import org.eclipse.viatra.solver.language.serializer.ProblemSemanticSequencer; | ||
16 | import org.eclipse.viatra.solver.language.serializer.ProblemSyntacticSequencer; | ||
17 | import org.eclipse.viatra.solver.language.services.ProblemGrammarAccess; | ||
18 | import org.eclipse.viatra.solver.language.validation.ProblemConfigurableIssueCodesProvider; | ||
19 | import org.eclipse.viatra.solver.language.validation.ProblemValidator; | ||
20 | import org.eclipse.xtext.Constants; | ||
21 | import org.eclipse.xtext.IGrammarAccess; | ||
22 | import org.eclipse.xtext.generator.IGenerator2; | ||
23 | import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider; | ||
24 | import org.eclipse.xtext.naming.IQualifiedNameProvider; | ||
25 | import org.eclipse.xtext.parser.IParser; | ||
26 | import org.eclipse.xtext.parser.ITokenToStringConverter; | ||
27 | import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider; | ||
28 | import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter; | ||
29 | import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; | ||
30 | import org.eclipse.xtext.parser.antlr.ITokenDefProvider; | ||
31 | import org.eclipse.xtext.parser.antlr.Lexer; | ||
32 | import org.eclipse.xtext.parser.antlr.LexerBindings; | ||
33 | import org.eclipse.xtext.parser.antlr.LexerProvider; | ||
34 | import org.eclipse.xtext.resource.IContainer; | ||
35 | import org.eclipse.xtext.resource.IResourceDescriptions; | ||
36 | import org.eclipse.xtext.resource.containers.IAllContainersState; | ||
37 | import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider; | ||
38 | import org.eclipse.xtext.resource.containers.StateBasedContainerManager; | ||
39 | import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider; | ||
40 | import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions; | ||
41 | import org.eclipse.xtext.scoping.IGlobalScopeProvider; | ||
42 | import org.eclipse.xtext.scoping.IScopeProvider; | ||
43 | import org.eclipse.xtext.scoping.IgnoreCaseLinking; | ||
44 | import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider; | ||
45 | import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider; | ||
46 | import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider; | ||
47 | import org.eclipse.xtext.serializer.ISerializer; | ||
48 | import org.eclipse.xtext.serializer.impl.Serializer; | ||
49 | import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer; | ||
50 | import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer; | ||
51 | import org.eclipse.xtext.service.DefaultRuntimeModule; | ||
52 | import org.eclipse.xtext.service.SingletonBinding; | ||
53 | import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider; | ||
54 | |||
55 | /** | ||
56 | * Manual modifications go to {@link ProblemRuntimeModule}. | ||
57 | */ | ||
58 | @SuppressWarnings("all") | ||
59 | public abstract class AbstractProblemRuntimeModule extends DefaultRuntimeModule { | ||
60 | |||
61 | protected Properties properties = null; | ||
62 | |||
63 | @Override | ||
64 | public void configure(Binder binder) { | ||
65 | properties = tryBindProperties(binder, "org/eclipse/viatra/solver/language/Problem.properties"); | ||
66 | super.configure(binder); | ||
67 | } | ||
68 | |||
69 | public void configureLanguageName(Binder binder) { | ||
70 | binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.viatra.solver.language.Problem"); | ||
71 | } | ||
72 | |||
73 | public void configureFileExtensions(Binder binder) { | ||
74 | if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null) | ||
75 | binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("problem"); | ||
76 | } | ||
77 | |||
78 | // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 | ||
79 | public ClassLoader bindClassLoaderToInstance() { | ||
80 | return getClass().getClassLoader(); | ||
81 | } | ||
82 | |||
83 | // contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2 | ||
84 | public Class<? extends IGrammarAccess> bindIGrammarAccess() { | ||
85 | return ProblemGrammarAccess.class; | ||
86 | } | ||
87 | |||
88 | // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 | ||
89 | public Class<? extends ISemanticSequencer> bindISemanticSequencer() { | ||
90 | return ProblemSemanticSequencer.class; | ||
91 | } | ||
92 | |||
93 | // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 | ||
94 | public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() { | ||
95 | return ProblemSyntacticSequencer.class; | ||
96 | } | ||
97 | |||
98 | // contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 | ||
99 | public Class<? extends ISerializer> bindISerializer() { | ||
100 | return Serializer.class; | ||
101 | } | ||
102 | |||
103 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
104 | public Class<? extends IParser> bindIParser() { | ||
105 | return ProblemParser.class; | ||
106 | } | ||
107 | |||
108 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
109 | public Class<? extends ITokenToStringConverter> bindITokenToStringConverter() { | ||
110 | return AntlrTokenToStringConverter.class; | ||
111 | } | ||
112 | |||
113 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
114 | public Class<? extends IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() { | ||
115 | return ProblemAntlrTokenFileProvider.class; | ||
116 | } | ||
117 | |||
118 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
119 | public Class<? extends Lexer> bindLexer() { | ||
120 | return InternalProblemLexer.class; | ||
121 | } | ||
122 | |||
123 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
124 | public Class<? extends ITokenDefProvider> bindITokenDefProvider() { | ||
125 | return AntlrTokenDefProvider.class; | ||
126 | } | ||
127 | |||
128 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
129 | public Provider<? extends InternalProblemLexer> provideInternalProblemLexer() { | ||
130 | return LexerProvider.create(InternalProblemLexer.class); | ||
131 | } | ||
132 | |||
133 | // contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
134 | public void configureRuntimeLexer(Binder binder) { | ||
135 | binder.bind(Lexer.class) | ||
136 | .annotatedWith(Names.named(LexerBindings.RUNTIME)) | ||
137 | .to(InternalProblemLexer.class); | ||
138 | } | ||
139 | |||
140 | // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 | ||
141 | @SingletonBinding(eager=true) | ||
142 | public Class<? extends ProblemValidator> bindProblemValidator() { | ||
143 | return ProblemValidator.class; | ||
144 | } | ||
145 | |||
146 | // contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 | ||
147 | public Class<? extends ConfigurableIssueCodesProvider> bindConfigurableIssueCodesProvider() { | ||
148 | return ProblemConfigurableIssueCodesProvider.class; | ||
149 | } | ||
150 | |||
151 | // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 | ||
152 | public Class<? extends IScopeProvider> bindIScopeProvider() { | ||
153 | return ProblemScopeProvider.class; | ||
154 | } | ||
155 | |||
156 | // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 | ||
157 | public void configureIScopeProviderDelegate(Binder binder) { | ||
158 | binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class); | ||
159 | } | ||
160 | |||
161 | // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 | ||
162 | public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { | ||
163 | return DefaultGlobalScopeProvider.class; | ||
164 | } | ||
165 | |||
166 | // contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 | ||
167 | public void configureIgnoreCaseLinking(Binder binder) { | ||
168 | binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false); | ||
169 | } | ||
170 | |||
171 | // contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 | ||
172 | public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() { | ||
173 | return DefaultDeclarativeQualifiedNameProvider.class; | ||
174 | } | ||
175 | |||
176 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
177 | public Class<? extends IContainer.Manager> bindIContainer$Manager() { | ||
178 | return StateBasedContainerManager.class; | ||
179 | } | ||
180 | |||
181 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
182 | public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() { | ||
183 | return ResourceSetBasedAllContainersStateProvider.class; | ||
184 | } | ||
185 | |||
186 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
187 | public void configureIResourceDescriptions(Binder binder) { | ||
188 | binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class); | ||
189 | } | ||
190 | |||
191 | // contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2 | ||
192 | public void configureIResourceDescriptionsPersisted(Binder binder) { | ||
193 | binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class); | ||
194 | } | ||
195 | |||
196 | // contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
197 | public Class<? extends IGenerator2> bindIGenerator2() { | ||
198 | return ProblemGenerator.class; | ||
199 | } | ||
200 | |||
201 | } | ||