diff options
Diffstat (limited to 'language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java')
-rw-r--r-- | language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java b/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java new file mode 100644 index 00000000..0366f9cd --- /dev/null +++ b/language/src/main/xtext-gen/org/eclipse/viatra/solver/language/ProblemStandaloneSetupGenerated.java | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.26.0.M1 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language; | ||
5 | |||
6 | import com.google.inject.Guice; | ||
7 | import com.google.inject.Injector; | ||
8 | import org.eclipse.emf.ecore.resource.Resource; | ||
9 | import org.eclipse.xtext.ISetup; | ||
10 | import org.eclipse.xtext.common.TerminalsStandaloneSetup; | ||
11 | import org.eclipse.xtext.resource.IResourceFactory; | ||
12 | import org.eclipse.xtext.resource.IResourceServiceProvider; | ||
13 | |||
14 | @SuppressWarnings("all") | ||
15 | public class ProblemStandaloneSetupGenerated implements ISetup { | ||
16 | |||
17 | @Override | ||
18 | public Injector createInjectorAndDoEMFRegistration() { | ||
19 | TerminalsStandaloneSetup.doSetup(); | ||
20 | |||
21 | Injector injector = createInjector(); | ||
22 | register(injector); | ||
23 | return injector; | ||
24 | } | ||
25 | |||
26 | public Injector createInjector() { | ||
27 | return Guice.createInjector(new ProblemRuntimeModule()); | ||
28 | } | ||
29 | |||
30 | public void register(Injector injector) { | ||
31 | IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); | ||
32 | IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); | ||
33 | |||
34 | Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("problem", resourceFactory); | ||
35 | IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("problem", serviceProvider); | ||
36 | } | ||
37 | } | ||