/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

  1. package org.jnario.maven;
  2. import org.eclipse.emf.ecore.EPackage;
  3. import org.eclipse.xtext.ISetup;
  4. import org.jnario.feature.FeatureStandaloneSetupGenerated;
  5. import org.jnario.feature.feature.FeaturePackage;
  6. import com.google.inject.Guice;
  7. import com.google.inject.Injector;
  8. public class FeatureMavenStandaloneSetup implements ISetup {
  9. private static Injector injector = null;
  10. public Injector createInjectorAndDoEMFRegistration() {
  11. if (injector != null)
  12. return injector;
  13. EPackage.Registry.INSTANCE.put(FeaturePackage.eINSTANCE.getNsURI(), FeaturePackage.eINSTANCE);
  14. injector = Guice.createInjector(new FeatureMavenModule());
  15. new FeatureStandaloneSetupGenerated().register(injector);
  16. return injector;
  17. }
  18. }