/plugins/jnario-maven-plugin/src/main/java/org/jnario/maven/FeatureMavenStandaloneSetup.java
http://github.com/bmwcarit/Jnario · Java · 24 lines · 18 code · 6 blank · 0 comment · 2 complexity · af0d667009b4287f7cb7e0fb0e5662e2 MD5 · raw file
- package org.jnario.maven;
- import org.eclipse.emf.ecore.EPackage;
- import org.eclipse.xtext.ISetup;
- import org.jnario.feature.FeatureStandaloneSetupGenerated;
- import org.jnario.feature.feature.FeaturePackage;
- import com.google.inject.Guice;
- import com.google.inject.Injector;
- public class FeatureMavenStandaloneSetup implements ISetup {
- private static Injector injector = null;
- public Injector createInjectorAndDoEMFRegistration() {
- if (injector != null)
- return injector;
- EPackage.Registry.INSTANCE.put(FeaturePackage.eINSTANCE.getNsURI(), FeaturePackage.eINSTANCE);
- injector = Guice.createInjector(new FeatureMavenModule());
- new FeatureStandaloneSetupGenerated().register(injector);
- return injector;
- }
- }