/plugins/jnario-maven-plugin/src/main/java/org/jnario/maven/SpecMavenStandaloneSetup.java

http://github.com/bmwcarit/Jnario · Java · 24 lines · 18 code · 6 blank · 0 comment · 2 complexity · 6f8770e9ca275d9b9d46ae4dd8df3593 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.spec.SpecStandaloneSetupGenerated;
  5. import org.jnario.spec.spec.SpecPackage;
  6. import com.google.inject.Guice;
  7. import com.google.inject.Injector;
  8. public class SpecMavenStandaloneSetup implements ISetup {
  9. private static Injector injector = null;
  10. public Injector createInjectorAndDoEMFRegistration() {
  11. if (injector != null)
  12. return injector;
  13. EPackage.Registry.INSTANCE.put(SpecPackage.eINSTANCE.getNsURI(), SpecPackage.eINSTANCE);
  14. injector = Guice.createInjector(new SpecMavenModule());
  15. new SpecStandaloneSetupGenerated().register(injector);
  16. return injector;
  17. }
  18. }