/plugins/grooveclipse/org.grooveclipse.infrastructure.dsl/src-gen/org/grooveclipse/infrastructure/dsl/InfrastructureDslStandaloneSetupGenerated.java

http://grooveclipse.googlecode.com/ · Java · 44 lines · 27 code · 14 blank · 3 comment · 1 complexity · 307262a3563affbb2df1e7a10379938a MD5 · raw file

  1. package org.grooveclipse.infrastructure.dsl;
  2. import org.eclipse.emf.ecore.EPackage;
  3. import org.eclipse.xtext.ISetup;
  4. import org.eclipse.emf.ecore.resource.Resource;
  5. import com.google.inject.Guice;
  6. import com.google.inject.Injector;
  7. /**
  8. * Generated from StandaloneSetup.xpt!
  9. */
  10. @SuppressWarnings("all")
  11. public class InfrastructureDslStandaloneSetupGenerated implements ISetup {
  12. public Injector createInjectorAndDoEMFRegistration() {
  13. org.eclipse.xtext.common.TerminalsStandaloneSetup.doSetup();
  14. Injector injector = createInjector();
  15. register(injector);
  16. return injector;
  17. }
  18. public Injector createInjector() {
  19. return Guice.createInjector(new org.grooveclipse.infrastructure.dsl.InfrastructureDslRuntimeModule());
  20. }
  21. public void register(Injector injector) {
  22. if (!EPackage.Registry.INSTANCE.containsKey("http://www.grooveclipse.org/infrastructure/dsl/InfrastructureDsl")) {
  23. EPackage.Registry.INSTANCE.put("http://www.grooveclipse.org/infrastructure/dsl/InfrastructureDsl", org.grooveclipse.infrastructure.dsl.infrastructureDsl.InfrastructureDslPackage.eINSTANCE);
  24. }
  25. org.eclipse.xtext.resource.IResourceFactory resourceFactory = injector.getInstance(org.eclipse.xtext.resource.IResourceFactory.class);
  26. org.eclipse.xtext.resource.IResourceServiceProvider serviceProvider = injector.getInstance(org.eclipse.xtext.resource.IResourceServiceProvider.class);
  27. Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("infrastruct", resourceFactory);
  28. org.eclipse.xtext.resource.IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("infrastruct", serviceProvider);
  29. }
  30. }