/plugins/jnario-maven-plugin/src/main/java/org/eclipse/xtend/maven/XtendMavenStandaloneSetup.java
http://github.com/bmwcarit/Jnario · Java · 26 lines · 20 code · 6 blank · 0 comment · 2 complexity · dd8fdf3e11e06c2c813a61aed2b51a63 MD5 · raw file
- package org.eclipse.xtend.maven;
- import org.eclipse.emf.ecore.EPackage;
- import org.eclipse.xtend.core.XtendStandaloneSetupGenerated;
- import org.eclipse.xtend.core.xtend.XtendPackage;
- import org.eclipse.xtext.ISetup;
- import org.eclipse.xtext.xbase.annotations.XbaseWithAnnotationsStandaloneSetup;
- import com.google.inject.Guice;
- import com.google.inject.Injector;
- public class XtendMavenStandaloneSetup implements ISetup {
- private static Injector injector = null;
- public Injector createInjectorAndDoEMFRegistration() {
- if (injector != null)
- return injector;
- XbaseWithAnnotationsStandaloneSetup.doSetup();
- EPackage.Registry.INSTANCE.put(XtendPackage.eINSTANCE.getNsURI(), XtendPackage.eINSTANCE);
- injector = Guice.createInjector(new XtendMavenModule());
- new XtendStandaloneSetupGenerated().register(injector);
- return injector;
- }
- }