diff options
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java | 26 |
1 files changed, 26 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/ProblemStandaloneSetup.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java new file mode 100644 index 00000000..5652f859 --- /dev/null +++ b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language/src/main/java/org/eclipse/viatra/solver/language/ProblemStandaloneSetup.java | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.25.0 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language; | ||
5 | |||
6 | import org.eclipse.emf.ecore.EPackage; | ||
7 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
8 | |||
9 | import com.google.inject.Injector; | ||
10 | |||
11 | /** | ||
12 | * Initialization support for running Xtext languages without Equinox extension registry. | ||
13 | */ | ||
14 | public class ProblemStandaloneSetup extends ProblemStandaloneSetupGenerated { | ||
15 | |||
16 | public static void doSetup() { | ||
17 | new ProblemStandaloneSetup().createInjectorAndDoEMFRegistration(); | ||
18 | } | ||
19 | |||
20 | @Override | ||
21 | public Injector createInjectorAndDoEMFRegistration() { | ||
22 | if (!EPackage.Registry.INSTANCE.containsKey(ProblemPackage.eNS_URI)) | ||
23 | EPackage.Registry.INSTANCE.put(ProblemPackage.eNS_URI, ProblemPackage.eINSTANCE); | ||
24 | return super.createInjectorAndDoEMFRegistration(); | ||
25 | } | ||
26 | } | ||